#include <bits/stdc++.h>
using namespace std;
long long fun(long long x) {
  long long s, r, y;
  s = x;
  while (x > 0) {
    s += (x % 10);
    x = x / 10;
  }
  return s;
}
int main() {
  long long x, y, n, m, i;
  cin >> n;
  vector<long long> v;
  for (i = n; i >= 1 && i >= (n - 81); i--) {
    if (fun(i) == n) v.push_back(i);
  }
  cout << v.size() << endl;
  sort(v.begin(), v.end());
  for (i = 0; i < v.size(); i++) cout << v[i] << endl;
}
