Tonight $n$ young men are going to participate in Peter's campfire party.
They decide to play an ancient counting-out game which was first described by Titus Flavius Josephus.
Here is a brief introduction to the game.
Before starting the game, these young men will stand in a circle around the campfire and the first man to join the circle will start the game.
Counting will begin at the first man and proceed around the circle in the counterclockwise direction repeatedly.
That is, the first man will report one at the beginning, and the second one in the counterclockwise direction will report two, and so forth, until a poor man reports $k$ and consequently leaves the circle to become a bystander.
The game will be repeated with the remaining men, restarting from the next man in the counterclockwise direction who will be the new first man, going in the same direction, until all the young men have left the circle.
Peter wanna be the $m$-th one who left the circle since he strongly believes this number is lucky for him.
As a sophisticated programmer, can you point out the right place he should stand at before the game start so that he can achieve his goal?
For the sake of clarity, we assume the index of the first man to join the circle is $1$, the index of the next man in his counterclockwise direction is $2$, and so on.
By the definition, the index of the last man in that direction should be $n$, and your task is to determine the index of the place Peter wants.