#include <bits/stdc++.h>
using namespace std;
int k, n;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  long long i = 0;
  do {
    i += 5;
    for (long long j = i; !(j % 5); j /= 5) k++;
  } while (k < n);
  if (k == n)
    cout << 5 << endl
         << i << " " << i + 1 << " " << i + 2 << " " << i + 3 << " " << i + 4
         << endl;
  else
    cout << 0 << endl;
  return 0;
}
