#include <bits/stdc++.h>
using namespace std;
int zero(int n) {
  int count = 0;
  for (int i = 5; n / i >= 1; i *= 5) count += n / i;
  return count;
}
int main() {
  int m, a = 1, n = 0;
  cin >> m;
  while (zero(a) <= m) {
    if (zero(a) == m) {
      n++;
    }
    a++;
  }
  cout << n << endl;
  int c = a - n;
  for (int i = 0; i < n; i++) {
    cout << c << " ";
    c++;
  }
  return 0;
}
