#include <bits/stdc++.h>
using namespace std;
int f(int x) {
  int t = 0;
  while (x > 0) {
    t += x % 10;
    x /= 10;
  }
  return t;
}
int a[100];
int cnt;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i <= 81 && n - i > 0; i++) {
    if (n - i + f(n - i) == n) {
      a[cnt] = n - i;
      cnt++;
    }
  }
  cout << cnt << endl;
  for (int i = cnt - 1; i >= 0; i--) {
    cout << a[i] << endl;
  }
  return 0;
}
