The teacher brought 20 cupcakes to school, but there were only 17 students in the class. If each student had one cupcake, how many cupcakes were left?