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