#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int m = 0, n, l;
  cin >> n;
  for (int i = 5; i < 1000000000; i += 5) {
    l = i;
    while (l >= 5 && l % 5 == 0) {
      l = l / 5;
      m++;
    }
    if (m > n) {
      cout << 0;
      return 0;
    }
    if (m == n) {
      cout << 5 << endl;
      for (int k = 0; k < 5; k++) {
        cout << i + k << " ";
      }
      return 0;
    }
  }
}
