#include #include #include #define ALL(V) std::begin(V), std::end(V) int main() { int N; std::cin >> N; int len = (N - 1) / 36 + 1; int rem = (N - 1) % 36; int a = 1, b = 2; for (int i = 1; i <= rem; i++) { if (b == 9) { a++; b = a + 1; } else { b++; } } std::cout << a; while (len--) std::cout << b; std::cout << std::endl; return 0; }