In a charity event, Mia baked 24 cupcakes to sell. At the beginning of the sale, she sold half of the cupcakes. Later, she decided to donate 3 more cupcakes to the local shelter. How many cupcakes does Mia have left after these transactions?