#include <bits/stdc++.h>
using namespace std;
unsigned long long n, f, kol, m;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  kol = 1;
  m = 5;
  while (kol < n) {
    m += 5;
    f = m;
    while (f % 5 == 0) {
      f /= 5;
      ++kol;
    }
  }
  if (kol == n) {
    cout << "5\n"
         << m << " " << m + 1 << " " << m + 2 << " " << m + 3 << " " << m + 4;
  } else
    cout << "0";
  return 0;
}
