Question
Digit Dash
Kiran is fascinated by numbers crafted solely from digits 3 and 5. These numbers captivate him uniquely. He wants to know the N-th number in this exclusive sequence. Help Kiran find the N-th positive integer composed only of 3s and 5s.
Input
First and only line of the input contains a single integer N.

Constraints
1 ≤ N ≤ 1000000000000000
Output
Output should contain a single number, the Nth positive integer that Kiran loves.
Example
Sample Input
1
Sample Output
3

Sample Input
3
Sample Output
33

Explanation
series is like 3, 5, 33, 35, 55, 333......

Online