#include <bits/stdc++.h>
using namespace std;
int a[600000];
int main() {
  int n = 6 * 1e5;
  a[0] = 0;
  for (int i = 1; i < n; ++i) {
    int cur = i;
    int t = 0;
    while (cur % 5 == 0) {
      cur /= 5;
      t++;
    }
    a[i] = a[i - 1] + t;
  }
  int m;
  cin >> m;
  vector<int> res;
  for (int i = 1; i < n; ++i) {
    if (a[i] == m) {
      res.push_back(i);
    }
  }
  cout << res.size() << endl;
  for (int i = 0; i < res.size(); ++i) {
    cout << res[i] << " ";
  }
  return 0;
}
