#include <bits/stdc++.h>
struct heapCmp {
  bool operator()(int i, int j) { return i > j; }
};
template <typename T>
bool cmp(T x, T y) {
  return x > y;
}
using namespace std;
const int MAX = 1e5 + 5;
int main() {
  long long int n;
  scanf("%lld", &n);
  vector<long long int> ans;
  for (long long int i = n - 81; i < n; i++) {
    long long int tmp = i;
    long long int res = tmp;
    while (tmp) {
      res += tmp % 10;
      tmp = (long long int)(tmp / 10);
    }
    if (res == n) {
      ans.push_back(i);
    }
  }
  cout << ans.size() << "\n";
  sort(ans.begin(), ans.end());
  if (ans.size() != 0) {
    for (int i = 0; i < ans.size(); i++) {
      cout << ans[i] << "\n";
    }
  }
  return 0;
}
