A bake sale has 3 cakes for sale. Each cake was cut into 4 slices. Each slice was sold for $9. What was the total amount earned for the sale of all the cakes?