#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  long long int ans = 0;
  vector<long long int> v;
  for (long long int i = n - 1; i >= max(n - 81, 0LL); i--) {
    long long int temp = i;
    long long int sum = i;
    while (temp > 0) {
      sum += (temp % 10);
      temp /= 10;
    }
    if (sum == n) {
      ans++;
      v.push_back(i);
    }
  }
  cout << ans << endl;
  for (long long int i = (int)v.size() - 1; i >= 0; i--) cout << v[i] << endl;
  return 0;
}
