#include <bits/stdc++.h>
using namespace std;
long long pot5(long long x) {
  int cont = 0;
  while (x % 5 == 0) {
    x /= 5;
    cont++;
  }
  return cont;
}
int main() {
  ios::sync_with_stdio(false);
  int m;
  cin >> m;
  {
    long long i;
    long long cont = 0;
    for (i = 5;; i += 5) {
      long long p = pot5(i);
      cont += p;
      if (cont >= m) break;
    }
    if (cont == m) {
      cout << 5 << endl;
      for (long long j = i; j < i + 5; ++j) {
        if (j != i) cout << " ";
        cout << j;
      }
      cout << endl;
    } else {
      cout << 0 << endl;
    }
  }
  return 0;
}
