There are 1000 soldiers. One day it so happens that they have to kill each other and only one would remain alive. For eliminating the partiality, they decided to find some way. One of them suggested a way as follows:
Each of them carrying a sword will stand in a line and numbered accordingly starting from 1 to 1000. Now starting from number:1 , they will start to killing in a way as.. 1 kills 2, 3 kills 4... i.e. starting from 1 they will starting killing the next alive person. This will keep going in a circle until only one remain.Example for 7 soldiers:
If the number of soldiers is odd say 7, 1 will kill 2 , 3 will kill 4, 5 will kill 6 , 7 remains .. so he ll kill 1.
then remaining people are 3,5,7.
Now they start again 3 kills 5, 7 kills 5 so 7 remains alive
Thinking of this one of the soldier figures out that this way only one of the fixed person will stay alive if started from 1.
So you have to tell the position where he should stand to remain alive if killing starts from 1.