#include <bits/stdc++.h>
using namespace std;
vector<int> elms;
bool yes(int x, int y) {
  y = y - x;
  while (x != 0) {
    y -= (x % 10);
    x = x / 10;
  }
  return y == 0;
}
int main() {
  int n, s;
  cin >> n;
  s = max(0, n - 100);
  for (int i = s; i <= n; i++)
    if (yes(i, n)) elms.push_back(i);
  printf("%d\n", (int)elms.size());
  for (int i = 0; i < elms.size(); i++) {
    printf("%d\n", elms[i]);
  }
  return 0;
}
