#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int n;
bool solve(int x) {
  int ret = x;
  while (x) {
    ret += (x % 10);
    x /= 10;
  }
  return ret == n;
}
int main() {
  cin >> n;
  vector<int> v;
  for (int i = 0; i < N; ++i)
    if (solve(n - i)) v.push_back(n - i);
  cout << v.size() << endl;
  sort(v.begin(), v.end());
  for (int i : v) cout << i << endl;
  puts("");
  return 0;
}
