#include <bits/stdc++.h>
using namespace std;
vector<int> vt;
int n;
inline bool judge(int i) {
  int ans = i;
  while (i) {
    ans += i % 10;
    i /= 10;
  }
  return ans == n;
}
int main(void) {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  while (cin >> n) {
    vt.clear();
    for (int i = max(n - 81, 1); i <= n; ++i)
      if (judge(i)) vt.push_back(i);
    cout << vt.size() << endl;
    for (auto it : vt) cout << it << endl;
  }
}
