#include <bits/stdc++.h>
using namespace std;
vector<int> res;
int main() {
  int n;
  cin >> n;
  int chk = n;
  int i = 0;
  while (n--) {
    if (i == 100) break;
    int s = 0;
    int tmp = n;
    while (tmp != 0) {
      s += tmp % 10;
      tmp = tmp / 10;
    }
    if ((s + n) == chk) res.push_back(n);
    i++;
  }
  sort(res.begin(), res.end());
  cout << res.size() << endl;
  for (int i = 0; i < res.size(); i++) cout << res[i] << endl;
  return 0;
}
