#include <bits/stdc++.h>
using namespace std;
int a[400];
int cal(int x) {
  int ret = 0;
  while (x) {
    ret += x % 10;
    x /= 10;
  }
  return ret;
}
int solve(int n) {
  int cnt = 0;
  for (int i = n - 1; i >= 1 && i >= n - 200; --i)
    if (cal(i) + i == n) a[cnt++] = i;
  return cnt;
}
int main() {
  int n;
  cin >> n;
  int cnt = solve(n);
  cout << cnt << endl;
  for (int i = cnt - 1; i >= 0; --i) cout << a[i] << endl;
  return 0;
}
