Consider the special sequence of numbers, which satisfies the following requirements:
a = 0;
a = 1;
for every i = 1, 2, 3, ...
a[2*i] = a[i];
a[2*i+1] = a[i] + a[i+1];
Your task is easy, write a program which for a given value of N (0 < N < 1018) finds the Nth number of the sequence.
Only one number N.
For every N in the input write the Nth number of the sequence.