#include <bits/stdc++.h>
using namespace std;
int zcount(int n) {
  int i = 5, ans = 0;
  while (i <= n) {
    ans += n / i;
    i *= 5;
  }
  return ans;
}
int bin_search(int n, int l, int h) {
  if (l >= h) return 0;
  int mid = (l + h) / 2;
  if (n == zcount(mid))
    return mid;
  else if (n > zcount(mid))
    bin_search(n, mid + 1, h);
  else
    bin_search(n, l, mid);
}
int main() {
  int m;
  cin >> m;
  int x = bin_search(m, 1, 1000000);
  vector<int> v;
  for (long long i = x - 5; i <= x + 5; i++) {
    if (zcount(i) == m) v.push_back(i);
  }
  int sz = v.size();
  if (sz) {
    cout << sz << endl;
    for (auto i : v) cout << i << " ";
  } else
    cout << sz;
  cout << endl;
  return 0;
}
