#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
long long fun(long long n) {
  long long val = 5, ans = 0;
  while (val <= n) {
    ans += n / val;
    val = 5 * val;
  }
  return (ans);
}
int main() {
  long long n;
  scanf("%lld", &n);
  ;
  long long lo = 5, hi = 1e6, ans = 0;
  while (hi >= lo) {
    long long mid = (lo + hi) / 2;
    long long val = fun(mid);
    if (fun(mid) >= n) {
      ans = mid;
      hi = mid - 1;
    } else
      lo = mid + 1;
  }
  if (fun(ans) != n)
    cout << (0) << endl;
  else {
    cout << (5) << endl;
    cout << ans << " " << ans + 1 << " " << ans + 2 << " " << ans + 3 << " "
         << ans + 4 << endl;
  }
  return 0;
}
