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