Let be a positive integer. George wrote a program which finds positive integers a_1, a_2, ..., a_k, whose product increases times if we add to each of them, i.e.
(a_1 + 1) \cdot (a_2 + 1) \cdot ... \cdot (a_k + 1) = n \cdot a_1 \cdot a_2 \cdot ... \cdot a_k
Now, however, he wants to find out what's the smallest value of , for which this is possible. Write a program which solves George's new task.
Integer number (2 < n < 1000).
Print the required value of .
Example 1