#include <bits/stdc++.h>
using namespace std;
long a[100001];
int main() {
  long m, temp;
  cin >> m;
  a[1] = 5;
  long k = 2;
  long j = 2;
  while (j <= 100000) {
    if (k % 5 == 0) {
      long t = k;
      long c = a[j - 1];
      while (t % 5 == 0) {
        a[j++] = 0;
        t /= 5;
      }
      a[j] = c + 5;
    } else {
      a[j] = a[j - 1] + 5;
    }
    j++;
    k++;
  }
  if (a[m] == 0) {
    cout << 0 << endl;
    return 0;
  }
  cout << 5 << endl;
  for (long i = a[m]; i <= a[m] + 4; i++) {
    cout << i << " ";
  }
  cout << endl;
  return 0;
}
