#include <bits/stdc++.h>
using namespace std;
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
const long long LINF = 1e18;
int printYes() {
  cout << "Yes" << endl;
  return 0;
}
int printNo() {
  cout << "No" << endl;
  return 0;
}
int ans;
int printAns() {
  cout << ans << endl;
  return 0;
}
int pow(int x) {
  if (x == 0) {
    return 1;
  } else {
    return pow(x - 1) * 2;
  }
}
int main(int argc, char const *argv[]) {
  long long k;
  cin >> k;
  long long count = 0;
  for (long(i) = 0; (i) < (long)(100000000); (i)++) {
    int n = i + 1;
    int sn = 0;
    while (n != 0) {
      sn += n % 10;
      n = (n - n % 10) / 10;
    }
    if ((i + 1) / sn == 1) {
      cout << i + 1 << endl;
      count++;
    }
    if (k == count) {
      break;
    }
  }
  return 0;
}
