题目描述
Problem Description
Given that $4$ and $7$ are lucky digits, and other digits are not lucky digits. An integer is considered lucky if it contains only lucky digits in its decimal representation. You need to find the $k$-th lucky positive integer.
Input Format
The input consists of a single line.
A single integer $k$, as described in the problem.
Output Format
The output consists of a single line.
A single integer, representing the answer.
Sample Input and Output
Sample Input #1
1
Sample Output #1
4
Sample Input #2
2
Sample Output #2
7
Sample Input #3
3
Sample Output #3
44
Notes
Sample Input and Output 1 Explanation
Since it is a positive integer, the first one must be the digit $4$.
Data Size and Constraints
For $100\%$ of the data, $1 \leq k \leq 10^9$.
Note
This problem is translated from COCI2010-2011 CONTEST #1 T3 SRETAN.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
1
样例输出
4