#include <bits/stdc++.h>
using namespace std;
int sum(int a) {
  int sum = a;
  while (a) {
    sum += a % 10;
    a /= 10;
  }
  return sum;
}
int main() {
  vector<int> v;
  int a;
  cin >> a;
  int b = a;
  while (a) {
    int check = sum(a);
    if (check == b)
      v.push_back(a);
    else if (check + 100 < b)
      break;
    a--;
  }
  cout << v.size() << endl;
  reverse(v.begin(), v.end());
  for (auto i : v) {
    cout << i << endl;
  }
  return 0;
}
