Question 1052689
He starts with {{{X}}}.
First shop, he spends {{{X/2+2}}}. 
He has {{{X-(X/2+2)=X/2-2}}} left over.
Second shop, he spends {{{(X/2-2)/2+1=X/4-1+1=X/4}}}
So he now has {{{X/2-2-X/4=X/4-2}}} left over.
Third shop, he spends {{{(X/4-2)/2+1=X/8-1+1=X/8}}}
So he now has {{{X/4-2-X/8=X/8-2}}} left 
Fourth shop, he spends {{{(X/8-2)/2-1=X/16-1+1=X/16}}}
So now he has, {{{X/8-2-X/16=X/16-2}}}
So now set that equal to 3, and solve for X.
{{{X/16-2=3}}}
{{{X/16=5}}}
{{{X=80}}}