Cate and elena were playing a card game. The stack of cards in the middle had24 cards to begin with. Cate added 8 cards to the stack. Elena then took 12 cards. Finally, Cate took 9 cards from the stack. How many cards were left in the stack?