#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 7;
const int MOD = 1e9 + 7;
const double pi = acos(-1);
vector<int> ans;
int zeros(int n) {
  int count = 0;
  for (int i = 5; n / i >= 1; i *= 5) count += n / i;
  return count;
}
int main() {
  int m;
  cin >> m;
  for (int i = 1;; i++) {
    if (zeros(i) > m) {
      break;
    }
    if (zeros(i) == m) {
      ans.push_back(i);
    }
  }
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
