#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e6 + 7;
const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
int n;
vector<int> ans;
int getsum(int x) {
  int res = 0;
  while (x) {
    res += x % 10;
    x /= 10;
  }
  return res;
}
int main() {
  scanf("%d", &n);
  for (int i = max(0, n - 100); i <= n; ++i) {
    if (i + getsum(i) == n) ans.push_back(i);
  }
  printf("%d\n", (int)ans.size());
  for (int i = 0; i < ans.size(); ++i) {
    printf("%d\n", ans[i]);
  }
  return 0;
}
