#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:102400000,102400000")
const int N = 200005;
int n, k, ans[N], cnt;
bool check(int x) {
  int tmp = 0, tx = x;
  while (x) tmp += x % 10, x /= 10;
  if (tmp + tx == n) return true;
  return false;
}
int main() {
  scanf("%d", &n);
  for (int i = max(n - 100, 1); i <= n; ++i) {
    if (check(i)) ans[++cnt] = i;
  }
  printf("%d\n", cnt);
  for (int i = 1; i <= cnt; ++i) printf("%d\n", ans[i]);
  return 0;
}
