#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, h = 0, k, sum, count = 0;
  int a[100];
  cin >> x;
  if (x <= 100) {
    for (int i = 1; i < x; i++) {
      k = i;
      sum = k;
      while (k != 0) {
        sum += (k % 10);
        k = k / 10;
      }
      if (sum == x) {
        a[h] = i;
        count++;
        h++;
      }
    }
    cout << count << endl;
    if (count != 0) {
      for (int m = 0; m < count; m++) cout << a[m] << " " << endl;
    }
  } else {
    for (int i = (x - 100); i < x; i++) {
      k = i;
      sum = k;
      while (k != 0) {
        sum += (k % 10);
        k = k / 10;
      }
      if (sum == x) {
        a[h] = i;
        count++;
        h++;
      }
    }
    cout << count << endl;
    if (count != 0) {
      for (int m = 0; m < count; m++) cout << a[m] << " " << endl;
    }
  }
}
