#include <bits/stdc++.h>
using namespace std;
const int inv = 1000000000;
const int minv = -inv;
int n;
vector<int> res;
int main() {
  scanf("%d", &n);
  res.clear();
  for (int i = 1; i <= min(n - 1, 81); ++i) {
    int c = n - i;
    int s = c;
    int t = c;
    while (t > 0) {
      s += t % 10;
      t = t / 10;
    }
    if (s == n) res.push_back(c);
  }
  sort(res.begin(), res.end());
  printf("%d\n", (int)res.size());
  for (int i = 0; i < (int)res.size(); ++i) printf("%d\n", res[i]);
  return 0;
}
