A bakery sells cupcakes for $2 each and cookies for $1.50 each. One day, they sold 24 cupcakes and twice as many cookies as cupcakes. How much did they earn in total? Let's think step by step and output the final answer within \boxed{}.
user