#include <bits/stdc++.h>
const double PI = 3.141592653589793238460;
using namespace std;
string S, R;
int main() {
  long long int n, k, i, si = 0, m, sum;
  cin >> n;
  long long int a[100];
  for (i = 1; i < 82 && n - i > 0; i++) {
    k = n - i;
    sum = 0;
    while (k) {
      m = k % 10;
      sum += m;
      k /= 10;
    }
    if (sum == i) a[si++] = n - i;
  }
  cout << si << '\n';
  for (i = si - 1; i >= 0; i--) cout << a[i] << '\n';
  return 0;
}
