#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, m, n, k, temp, sumd = 0, count = 0;
  cin >> n;
  vector<long long int> vec;
  for (i = n; (i >= 0) && (i >= n - 81); --i) {
    temp = i;
    sumd = 0;
    while (temp != 0) {
      sumd += temp % 10;
      temp = temp / 10;
    }
    if (sumd + i == n) {
      vec.push_back(i);
      count++;
    }
  }
  sort(vec.begin(), vec.end());
  cout << count;
  for (i = 0; i < vec.size(); ++i) {
    cout << "\n" << vec[i];
  }
  return 0;
}
