Emma is selling handmade candles at a craft fair. She spends $3 on materials to make each candle and sells each one for $8. She made 50 candles and managed to sell 80% of them. If she had to pay a flat fee of $50 to rent her booth, how much profit did she make? Let's think step by step and output the final answer within \boxed{}.
user