eolymp
bolt
Try our new interface for solving problems
Problems

Tale about an apple

Tale about an apple

Time limit 1 second
Memory limit 122 MiB
prb2060-1

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 (1n62).

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
Author Анатолий Присяжнюк
Source Open and Distance Olympiads 2011-2012