I started out the day with 12 pieces of candy. I gave 2 pieces to one friend, and 4 pieces to another friend. Later that afternoon, my teacher gave me 5 more pieces of candy for turning in my homework. I ate 3 pieces in class. When I got home from school, I shared 2 pieces with my little sister. How many pieces of candy did I have at the end of the day?