Problems
Tale about an apple
Tale about an apple
Once the king gave the farmer an apple from his garden. Farmer went to the garden and sees: the entire garden is surrounded with n fences, each fence has only one gate, and at each gate stands a guard. The farmer came to the first guard and showed him the royal decree, and guard said to him: "Go and take, but when you return, give me half of your apples plus one". The same was said by the second, third guard, etc. How many apples must take the farmer to pay all the guards and leave only one apple for himself?
Input data
The only number n – the number of fences in the garden (1 ≤ n ≤ 62).
Output data
The number of apples, which should take the farmer to pay off all the guards a leave one apple for himself.
Examples
Input example #1
1
Output example #1
4
Input example #2
2
Output example #2
10