#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  t = 1;
  while (t--) {
    long long n, m = 0;
    cin >> n;
    while (n > 0) {
      m += 5;
      for (int y = m; y % 5 == 0; y /= 5) n--;
    }
    if (n == 0) {
      cout << 5 << "\n";
      for (int x = m; x < m + 5; x++) {
        cout << x << " ";
      }
    } else
      cout << 0 << "\n";
  }
  return 0;
}
