Олимпиадный тренинг

Задача 26979. logical conclusions


Задача

Темы: Вывод формулы
Bolik solves a logical problem. To solve it, he first made N basic assumptions. After that, the following process occurs: Holmes breaks all the assumptions into pairs, from each pair he discards the least probable assumption (the assumptions are such that there is always the least probable). If it turned out that some assumption was not enough, then Bolik leaves it for consideration. The algorithm repeats until Bolik has the last guess left. 

Bolick is also used to counting the number of inferences he has made. So, for example, if the 11th and 31st assumptions are considered and the 11th is discarded, then Bolik made one logical conclusion. If, for example, the 238th assumption lacked a pair, then Bolik leaves it for consideration, but, of course, does not consider this action as a logical conclusion. Moreover, Bolick checks the last output twice. 
Now Bolik wants to understand from the existing number of basic assumptions how many logical conclusions he has to draw. 
 
Input Format
The input is a natural number N (1 ≤   N ≤   10218) — number of base guesses. 
 
Output format
Print a single integer — number of inferences. 
 
Example
Enter Output
3 3