Sequence
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Mathematicians often explore numerical sequences like Fibonacci numbers or powers of two, where each term follows a specific rule. But what if the pattern isn't immediately clear?
Your task is to find the N-th term of the sequence: 3, 5, 6, 9, 10, 12, 17, 18, 20, 24, 33 …
Input
A natural number N (N ≤ 2012).
Output
The N-th term of the sequence.
Examples
Input #1
Answer #1
Submissions 857
Acceptance rate 27%