#include <bits/stdc++.h>
using namespace std;
long long int Sum(long long int x) {
  long long int ans = 0;
  while (x != 0) {
    ans += x % 10;
    x /= 10;
  }
  return ans;
}
int main() {
  int K, temp;
  cin >> K;
  long long int nusuke = 1;
  temp = K;
  while (K != 0) {
    for (int i = 1; i <= 10; i++) {
      if (nusuke * Sum(nusuke + i) <= (nusuke + i) * Sum(nusuke)) {
      } else {
        break;
      }
      if (i == 10) {
        K--;
      }
    }
    if (temp != K) cout << nusuke << endl;
    nusuke++;
    temp = K;
  }
  return 0;
}
