#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> a;
bool check(int x) {
  int s = x;
  for (int i = 1; x; i++) s += x % 10, x /= 10;
  if (s == n) return 1;
  return 0;
}
int main() {
  scanf("%d", &n);
  for (int i = (n - 100 > 0) ? n - 100 : 0; i <= n; i++) {
    if (check(i)) a.push_back(i);
  }
  printf("%d", a.size());
  for (int i = 0; i < a.size(); i++) printf("\n%d", a[i]);
  return 0;
}
