#t282. 猴子吃桃

猴子吃桃

Monkeys and Peaches

Problem Background

Special for beginners, ^_^

Problem Description

There is a pile of peaches on the beach, and NN monkeys come to divide them. The first monkey splits the pile into NN equal parts, with one peach left over; it throws that extra peach into the sea and takes away one part. The second monkey then splits the remaining peaches into NN equal parts, again with one left over, throws it into the sea, and takes away one part. The third, fourth, ..., and NN-th monkeys each do the same: split the remaining peaches into NN equal parts, throw away the one extra, and take one part.

Write a program that, given the number of monkeys NN, outputs the minimum number of peaches on the beach such that every monkey can get its share.

Input Format

One integer NN.

Output Format

Output the minimum number of peaches on the beach when the number of monkeys is NN. The result is guaranteed to fit in an int.

Sample Input

2

Sample Output

7

Constraints

1s, 1024KiB for each test case.