#include <bits/stdc++.h>
using namespace std;
stringstream ss;
const long long N = 1e5 + 5;
const long long mod = 1e9 + 7;
long long arr[N];
vector<int> store;
int f(int a) {
  if (a < 0) return -1;
  int sum = 0;
  while (a) {
    sum += (a % 10);
    a /= 10;
  }
  return sum;
}
int main() {
  ios_base::sync_with_stdio(false);
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    for (long long i = 0; i <= 81; i++) {
      if (f(n - i) == i) {
        store.push_back(n - i);
      }
    }
    sort(store.begin(), store.end());
    cout << (long long)store.size() << "\n";
    for (long long i = 0; i <= (long long)store.size() - 1; i++)
      cout << store[i] << "\n";
  }
}
