#pragma GCC optimize("Ofast") #include using namespace std; typedef long long int ll; typedef unsigned long long int ull; mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()); ll myRand(ll B) { return (ull)rng() % B; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); vector> v; for (int i = 1; i < 10; i++) { for (int j = i + 1; j < 10; j++) { v.push_back({i * 10 + j, j}); } } int m = v.size(); int n; cin >> n; n -= 1; cout << v[n % m].first; for (int i = 0; i < n / m; i++) { cout << v[n % m].second; } cout << endl; }