#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void amin(T &x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
inline void amax(T &x, U y) {
  if (x < y) x = y;
}
int main() {
  int m;
  while (~scanf("%d", &m)) {
    vector<int> ans;
    for (int n = 1;; ++n) {
      int r = 0;
      for (int x = n / 5; x > 0; x /= 5) r += x;
      if (r > m) break;
      if (r == m) ans.push_back(n);
    }
    printf("%d\n", (int)ans.size());
    for (int i = 0; i < (int)ans.size(); ++i) {
      if (i != 0) putchar(' ');
      printf("%d", ans[i]);
    }
    puts("");
  }
  return 0;
}
