#include <bits/stdc++.h>
using namespace std;
int s(int k) {
  int sum = 0;
  while (k > 0) {
    sum += k % 10;
    k = int(k / 10);
  }
  return sum;
}
int main() {
  long long x;
  vector<int> a(0);
  cin >> x;
  for (int i = 81; i > 0; i--) {
    if (s(x - i) == i) a.push_back(x - i);
  }
  cout << a.size() << endl;
  for (int i = 0; i < a.size(); i++) {
    cout << a[i] << endl;
  }
  return 0;
}
