#include <bits/stdc++.h>
using namespace std;
int solve(int x) {
  int sum = 0;
  while (x >= 5) {
    sum += x / 5;
    x /= 5;
  }
  return sum;
}
int main() {
  int m;
  cin >> m;
  int k = 0;
  vector<long long> vec;
  for (int i = 1; i <= 1000000; i++) {
    long long sum = solve(i);
    if (sum == m) {
      k++;
      vec.push_back(i);
    } else if (sum > m)
      break;
  }
  cout << k << endl;
  for (int i = 0; i < k; i++) cout << vec[i] << " ";
  return 0;
}
