#include #include #include #include #include #include #include #include #include #include using ll = long long; using namespace std; int main() { ll n; cin >> n; vector v = {12, 13, 14, 15, 16, 17, 18, 19, 23, 24, 25, 26,\ 27, 28, 29, 34, 35, 36, 37, 38, 39, 45, 46, 47,\ 48, 49, 56, 57, 58, 59, 67, 68, 69, 78, 79, 89}; ll quo = n/36; string s = to_string(v[(n-1)%36]); char t = s.back(); while (quo){ s += t; quo--; } cout << s << endl; }