John buys a box of 40 light bulbs.  He uses 16 of them and then gives half of what is left to a friend.  How many does he have left?
Please reason step by step, and put your final answer within \boxed{}.
user