Very easy

Execution time limit is 1 second

Runtime memory usage limit is 122.081 megabytes

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?

The only number n – the number of fences in the garden (1 ≤ n ≤ 62).

The number of apples, which should take the farmer to pay off all the guards a leave one apple for himself.

Input #1

Answer #1

Input #2

Answer #2