eolymp
bolt
Try our new interface for solving problems
Problems

Function

Function

Time limit 1 second
Memory limit 128 MiB
prb1868-e

Calculate the function:

Input data

One positive integer n (1n10^12).

Output data

Print the value of f(n) modulo 2^32.

Examples

Input example #1
7
Output example #1
10
Author Sergey Kopeliovich
Source Winter School, Kharkov, 2011, Day 5