4. In a deck of 52 cards, each person makes one cut. A cut consists of taking the top $N$ cards and placing them at the bottom of the deck, without changing their order.

- First, Andrey cut 28 cards,
- then Boris cut 31 cards,
- then Vanya cut 2 cards,
- then Gena cut several cards,
- then Dima cut 21 cards.

The last cut restored the original order. How many cards did Gena cut?
Answer: 22.

Solution: Removing $N$ cards will result in the same outcome as moving $N$ cards one by one from the top to the bottom. We will consider that each of the boys moved one card several times.

After the last move, the order of the cards returned to the initial state, meaning the total number of card moves was a multiple of 52. The number of cards moved by all the boys except Gena is $28+31+2+21=82$. To reach the next multiple of 52, we are short of $2 \cdot 52-82=104-82=22$ cards.