A number of people (let's call it N) are stranded on an deserted island with a huge pile of bananas and a monkey. At night, each person does the following without the others knowing:
- They take one N'th (e.g. if N=3, one third) of the bananas in the pile and hides them
- The division leaves one banana left over, which is given to the monkey.
In the morning, they divide the remaining bananas among themselves and this time the split is even. There's nothing left over for the monkey.
Your task: Given the number of people (N), how many bananas were in the pile to begin with (lowest possible number)?
Input
Single number: N, which is the number of people. This number is a whole number that is greater than or equal to 2.
Output
Single number: the number of bananas in the original pile.
Sample input/output
Input:
5
Output:
3121