Mindy and Troy combined ate 9 pieces of wedding cake. Mindy ate 3 pieces of cake, and Troy had 1/4 of the total cake. How many pieces of cake were there in all?
a) 12
b) 16
c) 18
d) 24