#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7FFFFFFF;
int main() {
  int n, sum = 0, k, a[200], d = 0;
  cin >> n;
  for (int i = max(n - 200, 0); i <= n; i++) {
    sum = i;
    k = i;
    for (; k;) {
      sum += k % 10;
      k /= 10;
    }
    if (sum == n) a[++d] = i;
  }
  cout << d << endl;
  for (int i = 1; i <= d; i++) cout << a[i] << endl;
  return 0;
}
