#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  while (cin >> n) {
    vector<int> ans;
    for (int i = 1; i <= 81; i++) {
      int x = n - i;
      if (i > x) break;
      int sum = 0;
      while (x) {
        sum += x % 10;
        x /= 10;
      }
      if (sum == i) {
        ans.push_back(n - i);
      }
    }
    printf("%d\n", (int)ans.size());
    for (int i = (int)ans.size() - 1; i >= 0; i--) {
      printf("%d\n", ans[i]);
    }
  }
  return 0;
}
