#include <bits/stdc++.h>
using namespace std;
int m[100005];
int main() {
  long long int m, f, i, c, j;
  cin >> m;
  f = 0;
  for (i = 0;; i++) {
    c = 0;
    for (j = 5; i / j >= 1; j = j * 5) {
      c = c + i / j;
    }
    if (c == m) {
      f = 1;
      break;
    } else if (c > m) {
      f = 2;
      break;
    }
  }
  if (f == 1) {
    cout << 5 << endl;
    for (j = i; j <= i + 4; j++) {
      cout << j << " ";
    }
    cout << endl;
  } else if (f == 2) {
    cout << "0" << endl;
  }
  return 0;
}
