calculate the changes of the money