#P784B. Kids' Riddle

Kids' Riddle

No submission language available for this problem.

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.

Samples

11

2

14

0

61441

2

571576

10

2128506

3