#include <bits/stdc++.h>
using namespace std;
int main() {
  int m;
  while (scanf("%d", &(m)) == 1) {
    vector<int> ans;
    for (int i = (5); i <= (500000); i++) {
      int sum = 0, t = i;
      while (t) {
        sum += t / 5;
        t /= 5;
      }
      if (sum == m) ans.push_back(i);
    }
    int sz = ans.size();
    printf("%d\n", sz);
    for (int i = (0); i <= (sz - 1); i++)
      printf("%d%c", ans[i], i == sz - 1 ? '\n' : ' ');
  }
  return 0;
}
