#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long int n;
  unsigned long long int m;
  cin >> n;
  m = n / 9;
  int f;
  f = n % 9;
  unsigned long long int t;
  t = 100;
  cout << 1 << 2 << 3 << 4 << 5 << 6 << 7 << 8 << 9;
  for (int i = 1; i < m; i++) {
    unsigned long long int a;
    a = t / 10;
    for (int q = 8; q >= 0; q--) {
      cout << t - a * q - 1;
    }
    t = t * 10;
  }
  for (int r = 0; r < f; r++) {
    cout << t - t / 10 * (8 - r) - 1;
  }
}
