#include <bits/stdc++.h>
using namespace std;
long long trailing_zeros(long long n) {
  long long cnt = 0, f = 5;
  while (f <= n) {
    cnt += (n / f);
    f *= 5;
  }
  return cnt;
}
int main() {
  long long n;
  cin >> n;
  long long high = 5000000000000000000, low = 0, mid, res = -1, temp, zero;
  while (low < high) {
    mid = (low + high) >> 1;
    zero = trailing_zeros(mid);
    if (zero == n) {
      res = mid;
      break;
    }
    if (zero > n)
      high = mid;
    else
      low = mid + 1;
  }
  if (res == -1) {
    cout << 0;
  } else {
    res = res - (res % 5);
    cout << 5 << endl;
    for (int i = 0; i < 5; i++) cout << res + i << " ";
  }
  return 0;
}
