A bakery sells cakes in two different sizes: small and large. In one week, they sold 150 cakes in total, out of which 40% were small cakes. If the price of a small cake is $5 and a large cake is $8, how much money did the bakery earn from the cake sales that week? Let's think step by step and output the final answer within \boxed{}.
user