Find the n-th number of the increasing sequence of positive integers:
1,\ 7,\ 11,\ 17,\ 71,\ 77,\ 111,\ 117,\ 171,\ 177,\ 711,\ 717,\ldots
One positive integer n (1 \leq n \leq 10^7).
Print the n-th number of the given sequence.
Beispiel 1