#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
int a[maxn];
int depart(int n) {
  int sum = 0;
  while (n) {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
int main() {
  int n, count = 0;
  scanf("%d", &n);
  int temp = n;
  while (n) {
    count++;
    n /= 10;
  }
  int c = 0;
  n = temp;
  for (int i = (n - count * 9); i < n; i++) {
    int sum = depart(i);
    if ((sum + i) == n) a[c++] = i;
  }
  if (!c) {
    printf("0\n");
    return 0;
  }
  printf("%d\n", c);
  for (int i = 0; i < c; i++) {
    if (i) printf("\n");
    printf("%d", a[i]);
  }
  return 0;
}
