#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  char c = getchar();
  long long t = 1, sum = 0;
  while (!isdigit(c)) t = c == '-' ? -1 : 1, c = getchar();
  while (isdigit(c)) sum = sum * 10 + c - '0', c = getchar();
  return sum * t;
}
int num[20];
int ans[11000];
int pw[10], cnt;
void work(int pos, int val, int v, int sum) {
  if (v * pw[9 - pos + 1] + pw[9 - pos + 1] - 1 + sum + 9 * (9 - pos + 1) < val)
    return;
  if (v + sum > val) return;
  if (pos == 10) {
    if (v + sum == val) {
      cnt++;
      ans[cnt] = v;
      return;
    }
  }
  if (val < 0) return;
  for (int i = 0; i <= 9; i++) work(pos + 1, val, v * 10 + i, sum + i);
}
int main() {
  pw[0] = 1;
  for (int i = 1; i <= 9; i++) pw[i] = pw[i - 1] * 10;
  int val = read();
  if (val == 100000001)
    printf("2\n99999937 100000000");
  else {
    work(1, val, 0, 0);
    printf("%d\n", cnt);
    for (int i = 1; i <= cnt; i++) printf("%d ", ans[i]);
  }
}
