#include <bits/stdc++.h>
const double EPS = 0.00000001;
const long long mod = 1000000000 + 7;
using namespace std;
int f(long long n) {
  if (n < 5) return 0;
  return f(n / 5) + (n / 5);
}
int main() {
  int n, b = 0;
  cin >> n;
  long long x = 0;
  for (long long i = 5;; i += 5) {
    x = f(i);
    if (x == n) {
      cout << 5 << endl;
      for (int j = i; j < i + 5; j++) cout << j << " ";
      b = 1;
      break;
    } else if (x > n)
      break;
  }
  if (!b) cout << 0 << endl;
  int ____________;
  cin >> ____________;
  return 0;
}
