#include <bits/stdc++.h>
using namespace std;
int fun(int n) {
  int sum = 0;
  while (n) {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
int main() {
  int n, cnt = 0;
  cin >> n;
  if (n <= 100) {
    for (int i = 0; i < n; i++) {
      if (fun(i) + i == n) cnt++;
    }
    cout << cnt << endl;
    for (int i = 0; i < n; i++) {
      if (fun(i) + i == n) cout << i << endl;
    }
  } else {
    for (int i = n - 100; i < n; i++) {
      if (fun(i) + i == n) cnt++;
    }
    cout << cnt << endl;
    for (int i = n - 100; i < n; i++) {
      if (fun(i) + i == n) cout << i << endl;
    }
  }
  return 0;
}
