Nicholas put 1,012 baseball cards into boxes. He put 22 cards in each box. How many boxes did Nicholas need for these baseball cards?