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