往届 ACM 队训练题 (参考)

1020. Hanoi Tower III

A double tower of hanoi contains 2n disks of n different sizes,two of each size.As usual,we’re required to move only one disk at a time,without putting a larger one over a smaller one.

How many moves does it take to transfer a double tower from one peg to another,if disks of equal size are indistinguishable from each other?

输入格式

There are so many tests.Each test have one interger n(1<=n<=60) represented the number of disks.

输出格式

Output a single number of the minimum steps in a line.

样例

Input
1
5

Output
2
62