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

Submit

Login to submit.

Statistics

84% Solution Ratio
TanbirTopEarliest, 2M ago
adnanakib2017Fastest, 0.0s
sajeeb22Lightest, 5.2 MB
Nusab19Shortest, 35B
Toph uses cookies. By continuing you agree to our Cookie Policy.