#include <bits/stdc++.h>
using namespace std;
int f[111111];
int main() {
  int n, x, i, t, sum, cnt = 0;
  scanf("%d", &n);
  x = max(0, n - 100);
  for (i = x; i <= n; i++) {
    t = i;
    sum = i;
    while (t > 0) {
      sum = sum + t % 10;
      t = t / 10;
    }
    if (sum == n) f[++cnt] = i;
  }
  printf("%d\n", cnt);
  for (i = 1; i <= cnt; i++) printf("%d\n", f[i]);
  return 0;
}
