Sarah had 40 pens at the beginning of the month. Over the course of the month, she gave away 27 pens to her friends. Later, in a pen collection competition, Sarah noticed that the winner had 51 pens. How many more pens does she need to have in order to match the winner's collection?