#include <bits/stdc++.h>
using namespace std;
int main() {
  int m;
  int n, x;
  bool encontrado = false;
  cin >> m;
  for (int i = 0; i < 500000; i++) {
    x = (i / 5 + i / 25 + i / 125 + i / 625 + i / 3125 + i / 15625 + i / 78125 +
         i / 390625);
    if (x == m) {
      cout << "5" << endl;
      n = i;
      encontrado = true;
      break;
    }
  }
  if (encontrado == true) {
    cout << n << " " << n + 1 << " " << n + 2 << " " << n + 3 << " " << n + 4;
  } else {
    cout << "0";
  }
}
