#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:256000000")
using namespace std;
const int MOD = (int)1e9 + 7;
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
const int MAXN = (int)3e5 + 5;
int n;
int m, p[MAXN], ia = 0;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  scanf("%d", &n);
  for (int i = n; i > n - 100 && i > 0; i--) {
    int c = i;
    int sum = i;
    while (c > 0) {
      sum += c % 10;
      c /= 10;
    }
    if (sum == n) p[ia++] = i;
  }
  cout << ia << "\n";
  sort(p, p + ia);
  for (int i = 0; i < ia; i++) cout << p[i] << "\n";
  return 0;
}
