eolymp
bolt
Try our new interface for solving problems
Problems

The Garland

The Garland

Time limit 1 second
Memory limit 122 MiB
prb77

The New-year tree decorated by the garland of endless length which consists of the consistently united bulbs. When a garland is turn on only the first bulb lights up in the way from a switch and its burns one second. Then a garland begins to blink by such rule. In every second for every bulb is checking up a condition: if only one adjacent bulb is burning, this bulb will burn on a next second; else – it will not burn. The first bulb has only one nearby.

You have to write the program that by the number of second will find the quantity of bulbs of garland that will burn during this second.

Input data

One integer n (1n10^9) - the number of the second.

Output data

Print one integer - the number of bulbs that will be burning at the second number n.

Examples

Input example #1
5
Output example #1
2
Author Andrey Korotkov
Source 2008 XXI All-Ukrainian Informatics Olympiad, Lvov, April 5 - 11, Round 1