#include <bits/stdc++.h>
using namespace std;
int main() {
  int m;
  cin >> m;
  int cnt = 0;
  int i = 0;
  for (i = 1; cnt < m; ++i) {
    int temp = i;
    cnt += 1;
    while (temp % 5 == 0) {
      cnt += 1;
      temp /= 5;
    }
  }
  i -= 1;
  if (cnt != m)
    cout << 0 << endl;
  else {
    cout << 5 << endl;
    printf("%d %d %d %d %d\n", 5 * i, 5 * i + 1, 5 * i + 2, 5 * i + 3,
           5 * i + 4);
  }
}
