Binary Palindromes 2
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Your task is to find the i-th non-negative binary palindrome.
A binary palindrome is a number that reads the same forwards and backwards in the binary numeral system. For example, the numbers 5, 7, 9, and 21 are binary palindromes, whereas the numbers 4, 10, and 11 are not.
Input
The first line contains the integer: i.
Output
Output the i-th non-negative binary palindrome modulo 1000000007 on a single line.
Evaluation:
50% - i ≤
50% - i ≤
Examples
Input #1
Answer #1
Input #2
Answer #2
Input #3
Answer #3
Input #4
Answer #4
Submissions 27
Acceptance rate 44%