#include <bits/stdc++.h>
using namespace std;
int n, ans;
vector<int> solutions;
int addnum(int k) {
  int res = 0;
  for (; k; k /= 10) res += k % 10;
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  for (int i = max(1, n - 100); i < n; ++i) {
    if (addnum(i) + i == n) {
      ++ans;
      solutions.push_back(i);
    }
  }
  cout << ans << "\n";
  for (int i = 0; i < ans; ++i) cout << solutions[i] << '\n';
  return 0;
}
