Ones and sevens#7509

Ones and sevens

1 Sekunde
128 Megabyte
Leicht

Find the -th number of the increasing sequence of positive integers:

1,\ 7,\ 11,\ 17,\ 71,\ 77,\ 111,\ 117,\ 171,\ 177,\ 711,\ 717,\ldots

Eingabe

One positive integer (1 \leq n \leq 10^7).

Ausgabe

Print the -th number of the given sequence.

Beispiele

Beispiel 1

Loading
Loading