#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) { return (y == 0) ? x : gcd(y, x % y); }
long long lcm(long long x, long long y) { return x * (y / gcd(x, y)); }
int findTrailingZeros(int n) {
  int count = 0;
  for (int i = 5; n / i >= 1; i *= 5) count += n / i;
  return count;
}
int main() {
  int m;
  cin >> m;
  set<int> ans;
  for (int i = 0; i <= 1000000; i++)
    if (findTrailingZeros(i) == m) ans.insert(i);
  cout << ans.size() << endl;
  for (set<int>::iterator t = ans.begin(); t != ans.end(); t++)
    cout << *t << " ";
  return 0;
}
