Nodes and Depth

Limits 1s, 512 MB


From the above figure, the number of nodes for the first three depths are 3, 9, and 27.

You will be given a number N. Your task is to find out the total number of nodes within the first N depth.

Input

Enter a single integer, N, where 0 ≤ N ≤ 30.

Output

Print the answer for the mentioned problem.

Samples

InputOutput
2
13
InputOutput
3
40