#include <bits/stdc++.h>
using namespace std;
long sod(long n) {
  long sum = 0;
  while (n != 0) {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
int main() {
  long n;
  cin >> n;
  std::vector<long> res;
  for (long i = 1; i <= 100; i++) {
    if (sod(n - i) == i) {
      res.push_back(n - i);
    }
  }
  cout << res.size() << endl;
  sort(res.begin(), res.end());
  for (long i : res) cout << i << endl;
}
