Cuperman has two cups A and B. There are x balls in A, y balls in B. You can move balls between these two cups. The number of balls can be moved from A to B (or from B to A) is equal to the number of balls in B (or in A). For example, if A has 3 balls and B has 2 balls, you only can move 2 balls from A to B, but cannot move 2 balls from B to A. Now Cuperman wants to know, how many move steps he need to obtain one empty cup.