2336 - 【入门】汉诺塔的移动次数

通过次数

8

提交次数

8

Time Limit : 1 秒
Memory Limit : 128 MB

汉诺塔的问题大家都已经很熟悉了,有三个柱子,每个柱子上有一些大小不一的金片,要把金片从A柱移动到C柱,可以借助B柱,请问n个金片的情况下,需要最少移动多少次?

Input

输入一个整数n代表金片的数量(n<=20)

Output

一个整数,代表n个金片的移动次数

Examples

Input

3

Output

7

Source

递归