#include <bits/stdc++.h>
using namespace std;
int sum(int a) {
  int t = 0;
  while (a != 0) {
    t += a % 10;
    a /= 10;
  }
  return t;
}
int main() {
  long long n;
  cin >> n;
  int k = 0;
  for (int i = 1; i < 100; i++) {
    if (i == sum(n - i)) {
      k++;
    }
  }
  cout << k << endl;
  for (long long int i = 100; i >= 1; i--) {
    if (i == sum(n - i)) {
      cout << n - i << endl;
    }
  }
  return 0;
}
