Tim has some cans of soda. Jeff comes by, and takes 6 cans of soda from Tim. Tim then goes and buys another half the amount of soda cans he had left. If Tim has 24 cans of soda in the end, how many cans of soda did Tim have at first?
Let x be the number of cans Tim has at first.
After Jeff comes by, Tim has x-6 cans left.
Tim buys another (x-6)/2 cans.
x-6+(x-6)/2=24
2*x-12+x-6=48
3*x-18=48
3*x=66
x=<<22=22>>22
#### 22