#include <bits/stdc++.h>
using namespace std;
const int MN = 600000;
long long m;
long long count(int n) {
  long long ans = 0;
  for (int i = 5; n / i >= 1; i *= 5) {
    ans += n / i;
  }
  return ans;
}
int main(void) {
  cin >> m;
  if (m == 5) {
    cout << "0\n";
  } else {
    long long ans = 0;
    vector<long long> num;
    for (long long i = 5; i < MN; i++) {
      if (count(i) > m) break;
      if (count(i) == m) {
        ans++;
        num.push_back(i);
      }
    }
    cout << ans << "\n";
    for (int i = 0; i < num.size(); i++) {
      cout << num[i] << " ";
    }
    cout << "\n";
  }
  return 0;
}
