#include <bits/stdc++.h>
using namespace std;
long long int psum(long long int p) {
  long long int sum = p;
  while (p != 0) {
    sum += p % 10;
    p = p / 10;
  }
  return sum;
}
long long int q[200];
int main() {
  long long int n, p, num = 0;
  cin >> n;
  p = n - 150;
  if (p < 0) p = 0;
  for (; p <= n; p++) {
    if (n == psum(p)) {
      q[num] = p;
      num++;
    }
  }
  cout << num << endl;
  for (int i = 0; i < num; i++) cout << q[i] << endl;
  return 0;
}
