#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> vec;
  int cnt = 0;
  for (int i = max(0, n - 90); i <= n; i++) {
    int tmp = i;
    int ans = i;
    while (tmp) {
      ans += tmp % 10;
      tmp /= 10;
    }
    if (ans == n) {
      vec.push_back(i);
      cnt++;
    }
  }
  if (cnt == 0)
    cout << 0 << endl;
  else {
    cout << cnt << endl;
    for (auto it : vec) cout << it << endl;
  }
  cin >> n;
  return 0;
}
