#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int a, b, c, x, y, z, i, j, k, m;
  cin >> m;
  for (i = 1; i <= 1000000; ++i) {
    x = 0;
    z = 5;
    while (z <= i) {
      x += (i / z);
      z *= 5;
    }
    if (x == m) v.push_back(i);
    if (x > m) break;
  }
  cout << v.size() << endl;
  if (v.size()) {
    for (i = 0; i < v.size(); ++i) {
      cout << v[i] << " ";
    }
    cout << endl;
  }
  return 0;
}
