Frank works in the supply room of a law firm. At the beginning of the month, he had 21 boxes of pens with 13 pens in each box. At the end of the month, there were 45 pens left. How many pens did he give out over the month?