#P1848. Godofgamblers

Godofgamblers

Have you ever seen the movie "God if gamblers"?

Yes, it's very exciting! You must be attracted by the deft skill of the god of gamblers.

He can play the cards as he wish. The action of shuffling cards is extramely handsome.

How I wish I had such a pair of hands! However, it will be only a dream forever.

There is a popular method of shuffling cards. Suppose you have a stack of 2*n cards.

Then mix the two stacks of cards uniformly. That is, the ith card of the original stack is placed in the p(i)th position of the new stack of the new stack where p(i) is a function defined like this:

                          p(i) = 2 * i         ( i <= n )

                       p(i) = 2 * ( i - n ) - 1     ( i > n) 

Give you an inter n. Calculate the minimum positive number of shuffling that makes the cards have the same order the original stack.

Input

A line containing an integer n whish is less than 10^9
There are multiple test cases. Input will be terminated EOF

Output

A line containing an integer which indicates the minimum positive number of shuffles.

Sample Input

1

Sample Output

2

HINT

Source