8292: 幸运数
[Creator : ]
Description
十进制数字中,只含有 6 与 8 的数字被称作幸运数。将所有的幸运数从小到大排序,第一个幸运数是 6,接下来是
8,66,68,86,88,…
给定 n,请输出第 n 个幸运数。
8,66,68,86,88,…
给定 n,请输出第 n 个幸运数。
Input
单个整数:表示 n。
Output
单个整数:表示第 n 个幸运数。
Constraints
100% 的数据,1≤n≤1,000,000,000,000,000。
Sample 1 Input
7
Sample 1 Output
666
Sample 2 Input
1
Sample 2 Output
6
Sample 3 Input
5
Sample 3 Output
86
6
88