#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int inf = 0x3f3f3f3f;
const int N = 2e5 + 10;
int func(int num) {
  int sum = num;
  while (num) {
    sum += num % 10;
    num /= 10;
  }
  return sum;
}
vector<int> ans;
void work() {
  int n;
  cin >> n;
  for (int i = max(0, n - 100); i <= n; i++) {
    if (func(i) == n) {
      ans.push_back(i);
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << endl;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  work();
}
