John had some sweets. He gave 1/3 of his sweets and another 4 to Peter. Then he gave 1/3 of the remaining sweets and another 3 to Mark, and 1/3 of the rest and another 3 to Xavier. In the end, he had 3 sweets left. How much did he have at first?
x = 0rigianl amount
give away 1/3 and 4 more leaves 2/3 x - 4
give away 1/3 of remaining and 3 more leaves 2/3 (2/3x-4) -3
give 1/3 away of remaining and 3 more leaves 2/3 ( 2/3(2/3x-4)-3) - 3
and that = 3 left
2/3 ( 2/3(2/3x-4)-3) - 3 = 3
2/3 ( 4/9x - 8/3 -3) = 6
2/3 (4/9x - 17/3) = 6
8/27x - 34/9 = 6
x = 33 originally