#include <bits/stdc++.h>
using namespace std;
int main() {
  int m;
  cin >> m;
  int ans = -1;
  vector<long long> sols;
  for (int i = 1; i <= 1000000; i++) {
    int x = i;
    while (x % 5 == 0) {
      x /= 5;
      m--;
    }
    if (m == 0) sols.push_back(i);
  }
  cout << sols.size() << endl;
  for (auto x : sols) cout << x << " ";
}
