#00049F

Sretan-COCI

Digits 4 and 7 are lucky, while all others are unlucky. An integer is lucky if it contains only lucky digits in decimal notation. We would like to know the K-th lucky positive integer.


InputThe first and only line of input contains a positive integer K (1 <= K <= 10^9).

OutputThe first and only line of output must contain the K-th lucky positive integer.


Input:
1
Output:
4

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.