#P784B. Kids' Riddle

Kids' Riddle

Description

Programmers' kids solve this riddle in 5-10 minutes. How fast can you do it?

The input contains a single integer n (0 ≤ n ≤ 2000000000).

Output a single integer.

Input

The input contains a single integer n (0 ≤ n ≤ 2000000000).

Output

Output a single integer.

11<br>
14<br>
61441<br>
571576<br>
2128506<br>
2<br>
0<br>
2<br>
10<br>
3<br>