#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long long int beg = 1;
  long long int ed = LONG_MAX;
  long long int count = 0;
  long long int mid;
  long long int m;
  bool flag = 0;
  cin >> m;
  while (beg <= ed) {
    count = 0;
    mid = (beg + ed) / 2;
    for (long long int i = 5;; i *= 5) {
      if (i > mid) break;
      count += (mid / i);
    }
    if (count == m) {
      flag = 1;
      break;
    } else if (m > count) {
      beg = mid + 1;
    } else
      ed = mid - 1;
  }
  if (flag) {
    cout << 5 << '\n';
    for (long long int i = (mid / 5) * 5; i <= ((mid / 5) * 5) + 4; i++)
      cout << i << " ";
  } else
    cout << 0 << '\n';
  return 0;
}
