#include <bits/stdc++.h>
using namespace std;
int a[10000000];
int judge(int p) {
  int sum = 0;
  int m = p;
  while (p) {
    sum += p % 10;
    p /= 10;
  }
  return sum + m;
}
int main() {
  int n;
  cin >> n;
  int count = 0;
  for (int i = max(0, n - 100); i <= n; i++) {
    if (judge(i) == n) {
      a[count] = i;
      count++;
    }
  }
  cout << count << endl;
  for (int i = 0; i < count; i++) {
    cout << a[i] << endl;
  }
  return 0;
}
