#include int main() { int n; std::cin >> n; n--; int c = n / 36; int p = n % 36; int a = -1, b = -1; for (int i = 1; i <= 9; i++) { for (int j = i + 1; j <= 9; j++) { if (p == 0) { a = i; b = j; } p--; } } std::cout << a << b; while (c--) { std::cout << b; } std::cout << '\n'; }