#include <bits/stdc++.h>
using namespace std;
int jumlah_digit(int x) {
  int ret = 0;
  while (x != 0) {
    ret = ret + (x % 10);
    x /= 10;
  }
  return ret;
}
int main() {
  int n;
  cin >> n;
  int cnt = 0;
  vector<int> cetak;
  for (int i = n; i >= n - 1000; i--) {
    if (i == 0) break;
    int tamb = jumlah_digit(i);
    if (tamb + i == n) {
      cnt++;
      cetak.push_back(i);
    }
  }
  cout << cnt << "\n";
  for (int i = cetak.size() - 1; i >= 0; i--) {
    cout << cetak[i] << "\n";
  }
}
