#include <bits/stdc++.h>
using namespace std;
int main() {
  int m;
  cin >> m;
  int zeros = 0;
  int addz = 0;
  vector<int> ans;
  for (int n = 1; zeros <= m; ++n) {
    int t = n;
    while (t % 5 == 0) {
      t /= 5;
      ++zeros;
    }
    if (zeros == m) {
      ans.push_back(n);
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); ++i) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
