#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout.setf(ios_base::fixed);
  cout.precision(28);
  int t = 0, f = 0, i = 1;
  int m;
  cin >> m;
  vector<int> ans;
  while (true) {
    int z = i;
    while (z % 2 == 0) {
      ++t;
      z /= 2;
    }
    while (z % 5 == 0) {
      ++f;
      z /= 5;
    }
    int tn = min(t, f);
    if (tn > m) {
      break;
    }
    if (tn == m) {
      ans.push_back(i);
    }
    ++i;
  }
  cout << ans.size() << endl;
  for (auto x : ans) {
    cout << x << " ";
  }
  return 0;
}
