#include <bits/stdc++.h>
using namespace std;
long long nz(long long x) {
  long long a = 0;
  long long f = 5;
  while (f <= x) {
    a += x / f;
    f *= (long long)5;
  }
  return a;
}
int main() {
  long long m;
  cin >> m;
  vector<long long> ans;
  for (long long i = 0; i < 1000000; ++i) {
    if (nz(i) == m) {
      ans.push_back(i);
    }
  }
  cout << ans.size() << "\n";
  for (auto i : ans) cout << i << " ";
}
