#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10, MOD = 1e9 + 7;
vector<int> vec;
long long int n;
long long int check(long long int x) {
  long long int sum = 0, tmp = x;
  while (x) {
    sum += x % 10;
    x /= 10;
  }
  return tmp + sum;
}
int main() {
  scanf("%lld", &n);
  for (int i = n - 82; i <= n; i++) {
    if (check(i) == n) vec.push_back(i);
  }
  printf("%d\n", (int)vec.size());
  for (int x : vec) printf("%d\n", x);
  return 0;
}
