This problem is a programming version of Problem 169 from projecteuler.net
Define and to be the number of different ways can be expressed as a sum of integer powers of 2 using each power no more than twice.
For example, since there are five different ways to express :
What is for a given ?
Input Format
One integer is given on first line representing .
Constraints
Output Format
Print one integer which is the answer to the problem.
Sample Input 0
10
Sample Output 0
5