#include <bits/stdc++.h>
using namespace std;
int m, a[100005];
void read();
void solve();
void write();
int main() {
  read();
  solve();
  write();
  return 0;
}
void read() { scanf("%d", &m); }
void solve() {
  int poz = 0;
  for (int i = 1; i <= m; i++) {
    int j = 5 * i;
    int cj = j;
    int nr = 0;
    while (j % 5 == 0) {
      nr++;
      j /= 5;
    }
    poz += nr;
    if (poz <= 100000) {
      a[poz] = cj;
    }
  }
}
void write() {
  if (a[m]) {
    printf("5\n");
    for (int i = a[m]; i <= a[m] + 4; i++) {
      printf("%d ", i);
    }
  } else {
    printf("0");
  }
}
