#include <bits/stdc++.h>
using namespace std;
const int N = 1000001;
int a[500001], b[500001];
string s[100];
int ans[101][101][4];
char ch[4] = {'f', 'a', 'c', 'e'};
int sumOfNum(int a) {
  int res = 0;
  while (a) {
    res += a % 10;
    a /= 10;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  int n, m, Ans = 0, sum = 0;
  cin >> n;
  vector<int> ans;
  for (int i = 100; i >= 1; --i) {
    if (sumOfNum(n - i) == i) ans.push_back(n - i);
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] << endl;
  return 0;
}
