3.THE INDIAN KIDS AMUSEMENT

Credits: 300

You must have heard that the Indian culture is quite different from that of Europe or Russia. So some Indian habits seem quite unusual or even weird .

So it is known that there is one popular game of Indian kids. N kids stand forming a circle and throw a ball to each other. First kid holding a ball throws it to the K-th kid to his left (1 = K = N/2). That kid catches the ball and in turn throws it to the K-th kid to his left, and so on. So the ball is passed from one kid to another until it comes back to the first kid. If for example N = 7 and K = 3, the kid receive the ball in the following order: 1, 4, 7, 3, 6, 2, 5, 1.

To make the game even more interesting the kids want to choose K as large as possible, but they want one condition to hold: each kid must own the ball during the game.

INPUT:

Input file contains one integer number N (3 = N = 10^2000) - the number of Indian kids taking part in the game.

OUPUT:

Output the only number - K that they should choose.

SAMPLE INPUT
Test #1
7
Test #2
6

SAMPLE OUTPUT:
Test #1
3
Test #2
1