407408: GYM102785 D We were trying to share an orange ...

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

D. We were trying to share an orange ...time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

As you know, oranges are made up of slices, and it is quite convenient to divide them into several portions for several people. Obviously, anyone can eat it up by oneself, or divide it for a company in which there are as many people as slices in the orange itself.

If the orange slices can be equally divided among $$$n$$$ people, then we say that it is suitable for such a company. And what minimum number of slices $$$m$$$ should be in an orange, so that it could be suitable for $$$k$$$ different companies (companies are considered different if they consist of a different number of people)?

Write a program which, according to the number of companies $$$k$$$, will find the minimum number of orange slices suitable for exactly these different companies $$$k$$$ or report that such a number does not exist.

Input

The input file contains a single integer $$$k$$$ $$$(1 \le k \le 1000)$$$.

Output

The output file contains a single integer $$$m$$$ or $$$-1$$$ if such a number does not exist.

ExamplesInput
4
Output
6
Input
1
Output
1
Note

An orange consisting of 6 slices can be equally divided between 1, 2, 3 and 6 persons.

加入题单

算法标签: