#include <bits/stdc++.h>
using namespace std;
map<long long int, long long int> mp, mk;
set<long long int> s1, s2;
vector<long long int> v, w;
long long int a[2000006], b[2000006];
string s = "", p = "", q = "";
char ch;
long long int m, n, c, i, j, k, l, r, x, t, y, u, e, f, g, h, mn, mx, d;
int main() {
  cin >> n;
  for (i = 100; i >= 0; i--) {
    x = n - i;
    c = 0;
    k = x;
    while (k > 0) {
      r = k % 10;
      c += r;
      k /= 10;
    }
    if (x + c == n) v.push_back(x);
  }
  cout << v.size() << endl;
  for (i = 0; i < v.size(); i++) cout << v[i] << endl;
}
