#include <bits/stdc++.h>
using namespace std;
int ceros(int n) {
  int count = 0;
  for (int i = 5; n / i >= 1; i *= 5) count += n / i;
  return count;
}
int main() {
  long long m, aux, cont = 0, auxNum;
  vector<long long> factoriales;
  vector<long long> vector;
  while (true) {
    aux = ceros(cont);
    vector.push_back(aux);
    if (aux > 100000) {
      auxNum = cont;
      break;
    }
    cont++;
  }
  cin >> m;
  int i;
  for (i = 0; i < auxNum; i++) {
    if (vector[i] == m) {
      factoriales.push_back(i);
    }
  }
  cout << factoriales.size() << " " << endl;
  for (i = 0; i < factoriales.size(); i++) {
    cout << factoriales[i] << " ";
  }
  return 0;
}
