#include <bits/stdc++.h>
using namespace std;
int n, cnt;
int main() {
  cin >> n;
  for (int i = 5;; i += 5) {
    int t = i;
    while (t % 5 == 0) {
      cnt++;
      t /= 5;
    }
    if (cnt == n) {
      cout << "5\n"
           << i << " " << i + 1 << " " << i + 2 << " " << i + 3 << " " << i + 4;
      return 0;
    }
    if (cnt > n) {
      cout << 0;
      return 0;
    }
  }
  return 0;
}
