#t282. 猴子吃桃
猴子吃桃
Monkeys and Peaches
Problem Background
Special for beginners, ^_^
Problem Description
There is a pile of peaches on the beach, and monkeys come to divide them. The first monkey splits the pile into 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 equal parts, again with one left over, throws it into the sea, and takes away one part. The third, fourth, ..., and -th monkeys each do the same: split the remaining peaches into equal parts, throw away the one extra, and take one part.
Write a program that, given the number of monkeys , outputs the minimum number of peaches on the beach such that every monkey can get its share.
Input Format
One integer .
Output Format
Output the minimum number of peaches on the beach when the number of monkeys is . The result is guaranteed to fit in an int.
Sample Input
2
Sample Output
7
Constraints
1s, 1024KiB for each test case.