#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> a;
  int n, sum, q = 0;
  cin >> n;
  if (((n - 9) % 11 == 0) || (n == 3) || (n == 5) || (n == 7)) {
    cout << 0;
  } else {
    int i = n - 100;
    if (i < 1) i = 1;
    for (i; i < n; ++i) {
      sum = i;
      int h = i;
      while (h != 0) {
        sum += h % 10;
        h /= 10;
      }
      if (sum == n) {
        q++;
        a.push_back(i);
      }
    }
    cout << q << endl;
    for (int m = 0; m < a.size(); ++m) {
      cout << a[m] << endl;
    }
  }
}
