#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int m;
  cin >> m;
  vector<int> v;
  for (int i = 1; i <= m * 5 + 5; i++) {
    int num = 0;
    for (int j = 5; j <= i; j *= 5) num += i / j;
    if (m == num) v.push_back(i);
  }
  cout << v.size() << "\n";
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  return 0;
}
