#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int A[N];
int mods[N] = {0};
bool ok = false;
int mval = -1;
int digitsSum(int n) {
  int sum = 0;
  while (n) {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
vector<int> answers;
int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  for (int i = 1; i <= 90; i++) {
    if (n - i > 0 && digitsSum(n - i) + n - i == n) answers.push_back(n - i);
  }
  sort(answers.begin(), answers.end());
  cout << answers.size() << "\n";
  for (int i = 0; i < answers.size(); ++i) cout << answers[i] << "\n";
  return 0;
}
