#include <bits/stdc++.h>
using namespace std;
int n, cnt = 0, a[110];
int sum(int x) {
  int s = 0;
  for (; x; s += x % 10, x /= 10)
    ;
  return s;
}
int main() {
  cin >> n;
  for (int i = max(0, n - 100); i <= n; ++i)
    if (i + sum(i) == n) a[++cnt] = i;
  cout << cnt << endl;
  for (int i = 1; i <= cnt; ++i) cout << a[i] << endl;
  return 0;
}
