Problem C: 对折绳子
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:54
Solved:15
Description
一条绳子从中间剪一刀可以剪成两段绳子; 如果对折 1 次,中间剪一刀可以剪出 3 段绳子;如果连续对折 2 次,中间剪一刀可以剪出5 段绳子;
那么,连续对折 n 次,中间剪一刀可以剪出多少段绳子?
你发现其中的规律了吗? 编写程序,在给定绳子对折次数,计算出中间剪一刀后可剪出绳子的段数。
Input
1
Output
3
Sample Input Copy
3
Sample Output Copy
9
HINT
对折次数在20次以内