favorite We need a little bit of your help to keep things running, click on this banner to learn more
Problems

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

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

#### Output

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

Time limit 1 seconds
Memory limit 122.08 MiB
Input example #1
1

Output example #1
4

Input example #2
2

Output example #2
10

Author Анатолий Присяжнюк
Source Open and Distance Olympiads 2011-2012