#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t = 0, ar[1000];
  cin >> n;
  for (int i = max(n - 100, 1); i < n; i++) {
    int sum = i, num = i;
    while (num != 0) {
      sum += num % 10;
      num = num / 10;
    }
    if (sum == n) {
      ar[t++] = i;
    }
  }
  cout << t << endl;
  for (int i = 0; i < t; i++) {
    cout << ar[i] << endl;
  }
  return 0;
}
