#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> res;
  int i = 2, temp, z;
  while ((i * 11) - 4 < n) {
    i++;
  }
  int s = max(0, n - 81);
  while (s < n) {
    temp = s;
    z = s;
    while (temp > 0) {
      z += temp % 10;
      temp /= 10;
      if (z > n) break;
    }
    if (z == n) res.push_back(s);
    s++;
  }
  cout << res.size() << endl;
  for (int j = 0; j < res.size(); j++) cout << res[j] << endl;
}
