#include <bits/stdc++.h>
using namespace std;
long long x, test, d;
vector<long long> v;
int sum(long long a) {
  int b = 0;
  while (a) {
    b += a % 10;
    a /= 10;
  }
  return b;
}
int main() {
  cin >> x;
  if (x < 9) {
    for (int i = 1; i < x; i++) {
      if (i * 2 == x) {
        v.push_back(i);
      }
    }
    cout << v.size() << "\n";
    for (int i = 0; i < v.size(); i++) {
      cout << v[i] << "\n";
    }
    return 0;
  }
  test = x;
  while (test) {
    test /= 10;
    d++;
  }
  for (long long i = x - (9 * d); i <= x; i++) {
    if (i + sum(i) == x) v.push_back(i);
  }
  cout << v.size() << "\n";
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] << "\n";
  }
  return 0;
}
