A. [例1.10]猴子吃桃

    Type: Default 1000ms 256MiB

[例1.10]猴子吃桃

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

一只小猴买了若干个桃子。第一天他刚好吃了这些桃子的一半,又贪嘴多吃了一个;接下来的每一天它都会吃剩余的桃子的一半外加一个。第 nn 天早上起来一看,只剩下 11 个桃子了。请问小猴买了几个桃子?

输入格式

输入一个正整数 nn,表示天数。

输出格式

输出小猴买了多少个桃子。

样例 #1

样例输入 #1

4

样例输出 #1

22

提示

数据保证,1n201\le n\le20

龙凤苑中学A班4.19

Not Attended
Status
Done
Rule
IOI
Problem
4
Start at
2024-4-19 15:45
End at
2024-4-23 15:45
Duration
96 hour(s)
Host
Partic.
32