Classic Josephus problem

Description - In a circle of people, every nth person is eliminated until only one person remains.

Rules - Start at a designated person, count a fixed number of people in a clockwise direction, and eliminate the person you count. Repeat this process until only one person is left.


Enter the number of circles:

Guess the survivor position (starting from 1):