Eleanor is preparing cupcakes for a party. If she arranges the cupcakes in groups of 5, there are 3 cupcakes left over. If she arranges them in groups of 7, there are 2 cupcakes left over. If she arranges them in groups of 9, there are 4 cupcakes left over. What is the smallest number of cupcakes she could have baked? Let's think step by step and output the final answer within \boxed{}.
user