Linda went to a bakery and bought 3 cakes. Each cake costs $15. She also bought 5 pastries for $2 each. How much did Linda spend in total?