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