#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, t, sum, sum1 = 0;
  cin >> m;
  for (int i = 5; i <= 500000; i = i + 5) {
    t = i;
    sum = 0;
    while (t >= 5) {
      t = t / 5;
      sum++;
      if (t % 5 != 0) {
        break;
      }
    }
    sum = sum + sum1;
    if (sum == m) {
      cout << "5" << endl;
      for (int j = 0; j < 5; j++) {
        cout << i + j << " ";
      }
      break;
    } else if (sum > m) {
      cout << "0" << endl;
      break;
    }
    sum1 = sum;
  }
}
