#include <bits/stdc++.h>
int main() {
  int n, a, sum;
  scanf("%d", &n);
  int k = 0;
  int arr[100];
  for (int i = n - 9 * (log10(n) + 1 + 1); i <= n; i++) {
    sum = a = i;
    while (a != 0) {
      sum += a % 10;
      a /= 10;
    }
    if (sum == n) {
      arr[k++] = i;
    }
  }
  printf("%d\n", k);
  for (int i = 0; i < k; i++) {
    printf("%d\n", arr[i]);
  }
  return 0;
}
