#include <bits/stdc++.h>
using namespace std;
long long sum_of_digit(long long s) {
  long long sum(0);
  while (s) {
    sum += s % 10;
    s = s / 10;
  }
  return sum;
}
int main() {
  long long n, k(0);
  cin >> n;
  vector<long long> v;
  for (long long i = 1; i <= 90; i++)
    if (sum_of_digit(n - i) == i and n - i > 0) {
      k++;
      v.push_back(n - i);
    }
  sort(v.begin(), v.end());
  cout << k << endl;
  for (auto i : v) cout << i << endl;
  return 0;
}
