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