#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  long long i, j, k, n, t;
  cin >> n;
  long long c;
  vector<long long> v;
  for (i = n - 1000; i <= n + 5; i++) {
    j = i;
    c = 0;
    while (j > 0) {
      c += j % 10;
      j /= 10;
    }
    if (i + c == n) v.push_back(i);
  }
  cout << v.size() << endl;
  for (i = 0; i < v.size(); i++) cout << v[i] << endl;
  return 0;
}
