#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigMod(T p, T e, T M) {
  long long ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T modInverse(T a, T M) {
  return bigMod(a, M - 2, M);
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T lcm(T a, T b) {
  a = abs(a);
  b = abs(b);
  return (a / gcd(a, b)) * b;
}
template <class T>
inline string int2String(T a) {
  ostringstream str;
  str << a;
  return str.str();
}
inline void yes() {
  cout << "YES\n";
  exit(0);
}
inline void no() {
  cout << "NO\n";
  exit(0);
}
const int dr[] = {0, 1, 0, -1, -1, 1, 1, -1, -2, -2, 2, 2, -1, -1, 1, 1};
const int dc[] = {1, 0, -1, 0, 1, 1, -1, -1, -1, 1, -1, 1, -2, 2, -2, 2};
int N = 1e5 + 5;
const int mxn = 2e5 + 9;
int main() {
  int n, b, p, c, d;
  scanf("%d", &n);
  vector<int> vc;
  for (int i = 1;; i++) {
    b = 0;
    p = i;
    c = 5;
    while (p != 0) {
      b += (p / c);
      p /= c;
    }
    if (b == n) vc.push_back(i);
    if (b > n) break;
  }
  cout << vc.size() << endl;
  for (auto it = vc.begin(); it != vc.end(); it++) cout << *it << ' ';
  return 0;
}
