#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int addingM = N;
  int tempN = N;
  int sum = 0;
  string S = std::to_string(N);
  for (int i = 0; i < S.size(); i++) {
    sum += std::stoi(S.substr(i, 1));
  }
  int sunukeN = N / sum;
  int sunukeM = 0;
  while (tempN > 0) {
    addingM++;
    sum = 0;
    string M = std::to_string(addingM);
    for (int i = 0; i < M.size(); i++) {
      sum += std::stoi(M.substr(i, 1));
    }
    sunukeM = addingM / sum;
    if (sunukeM > sunukeN) {
      std::cout << addingM << std::endl;
      tempN--;
    } else {
    }
  }
  return 0;
}
