#include <bits/stdc++.h>
using namespace std;
struct __timestamper {};
int main() {
  int m;
  scanf("%d", &m);
  vector<int> ans;
  for (int i = 1; m >= 0; i++) {
    int j = i;
    while (j % 5 == 0) {
      j /= 5;
      m--;
    }
    if (!m) ans.push_back(i);
  }
  printf("%d\n", (int)ans.size());
  for (int x : ans) printf("%d ", x);
  printf("\n");
  return 0;
}
