#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> v;
  for (int i = n - 100; i <= n; i++) {
    int k = i;
    int sum = 0;
    while (k) {
      sum += k % 10;
      k /= 10;
    }
    if (sum + i == n) v.push_back(i);
  }
  printf("%d\n", v.size());
  for (auto it = v.begin(); it != v.end(); it++) printf("%d\n", *it);
  return 0;
}
