#include <bits/stdc++.h>
using namespace std;
vector<int> ans;
int m, n = 1e6;
int main() {
  cin >> m;
  while (n--) {
    int s = 0, times = 10, pw = 5;
    while (times--) {
      s += n / pw;
      pw *= 5;
    }
    if (m == s) ans.push_back(n);
  }
  printf("%d\n", ans.size());
  sort(ans.begin(), ans.end());
  for (int i = 0; i < ans.size(); i++) printf("%d ", ans[i]);
  return 0;
}
