#include <bits/stdc++.h>
using namespace std;
long long n;
bool ok(long long x) {
  long long t = x;
  while (x) {
    t += x % 10;
    x /= 10;
  }
  return t == n;
}
vector<long long> ans;
int main() {
  cin >> n;
  for (long long i = max(0LL, n - 200); i <= n; i++) {
    if (ok(i)) ans.push_back(i);
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << endl;
  }
  cout << endl;
  return 0;
}
