Maria has 12 apples. She gives 3 apples to her friend James and then buys 5 more apples from the store. How many apples does Maria have now?