#include <bits/stdc++.h>
using namespace std;
long long solve(long long x) {
  int ret = 0;
  while (x > 0) {
    ret += x % 10;
    x /= 10;
  }
  return ret;
}
int main() {
  long long int n;
  cin >> n;
  int cnt = 0;
  vector<long long int> out;
  for (int i = 0; i <= 100; i++) {
    long long x = n - i;
    long long p = solve(x);
    if (i == p) {
      cnt++;
      out.push_back(x);
    }
  }
  cout << cnt << "\n";
  sort(out.begin(), out.end());
  for (int i = 0; i < out.size(); i++) cout << out[i] << "\n";
  return 0;
}
