John eats a bag of chips for dinner and then eats twice as many after dinner. If he eats 3 bags of chips for dinner, how many bags of chips did he eat in total? Let's think step by step and output the final answer within \boxed{}.
user