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