#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
int f(int x) {
  int re = x;
  while (x > 0) {
    re += x % 10;
    x /= 10;
  }
  return re;
}
vector<int> ans;
int main() {
  int n;
  cin >> n;
  for (int i = max(0, n - 100); i < n; i++) {
    if (n == f(i)) ans.push_back(i);
  }
  cout << ans.size() << endl;
  for (int((i)) = (0); ((i)) < ((ans.size())); ((i))++) {
    if (i) cout << " ";
    cout << ans[i];
  }
  if (ans.size()) cout << endl;
}
