In a game, $N$ people are lined up in a circle and numbered from $0$ to $N-1$. At each turn, the next $K$th person, starting with the last eliminated person, is eliminated from the game. The first person to be eliminated is the $K$th. Find the last remaining person in the game. Example:
$N$ = 5, $K$ = 3
0 1 2 3 4
0 1 3 4
1 3 4
1 3
3
The last person is the 3rd one.