#P5743. 【深基7.习8】猴子吃桃

【深基7.习8】猴子吃桃

Problem Description

A little monkey bought some peaches. On the first day, it ate exactly half of the peaches, and then, being greedy, ate one more. On each following day, it eats half of the remaining peaches plus one more. On the morning of day nn, it finds that only 11 peach is left. How many peaches did the monkey buy?

Input Format

Input one positive integer nn, representing the number of days.

Output Format

Output how many peaches the monkey bought.

4
22

Hint

Constraints: 1n201\le n\le20.

Translated by ChatGPT 5