#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int l = 0;
  for (int i = 5; i <= 500000; i = i + 5) {
    int s = i;
    while (s % 5 == 0) {
      l++;
      s = s / 5;
    }
    if (l == n) {
      cout << 5 << endl;
      for (int j = i; j <= i + 4; j++) cout << j << ' ';
      return 0;
    } else if (l > n) {
      cout << 0;
      return 0;
    }
  }
}
