How to do an operation on a variable and assign it that new value for easing calculations?

Even better provide us with code we can run here: