#include <bits/stdc++.h>
using namespace std;
int ctoi(const char c) {
  if ('0' <= c && c <= '9') return (c - '0');
  return -1;
}
long long ten1(string s) {
  long long a = 0;
  for (long long i = s.size() - 1; i >= 0; i--) {
    a += ctoi(s[i]);
  }
  return a;
}
int main(void) {
  string k;
  cin >> k;
  int cnt = 0;
  long long i = 1;
  long long S;
  S = stoi(k) / ten1(k);
  while (stoi(k) != cnt) {
    if (S <= i / ten1(to_string(i))) {
      printf("%lld\n", i);
      cnt++;
    }
    i++;
  }
  return 0;
}
