#include <bits/stdc++.h>
using namespace std;
long long int ncr(long long int n, long long int r) {
  long long int ans = 1;
  if (r > n - r) r = n - r;
  for (int i = 1; i <= r; i++) ans = ans * (n - i + 1) / i;
  return ans;
}
long long int sumofdigits(long long int n) {
  long long int sum = 0;
  while (n > 0) {
    sum += n % 10;
    n = n / 10;
  }
  return sum;
}
int main() {
  long long int n, t, nt = 0;
  cin >> n;
  vector<long long int> q;
  for (int i = 0; i <= 100; i++) {
    t = n - i;
    if (t >= 0 && t + sumofdigits(t) == n) {
      q.push_back(t);
      nt++;
    }
  }
  cout << nt << endl;
  sort(q.begin(), q.end());
  for (int i = 0; i < nt; i++) {
    cout << q[i] << endl;
  }
  return 0;
}
