#890. Recurrent sequence (×3 + 2)
a₁ = 1, aₙ = aₙ₋₁ · 3 + 2. You get n. Find aₙ.
### Input
One integer n (1 ≤ n ≤ 40).
### Output
A number.
Examples
Input
2
Output
5
Input
14
Output
3188645
💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.