#include <bits/stdc++.h>
using namespace std;
bool vis[100005];
int main() {
  int n;
  while (cin >> n) {
    int i, tag = 0, num = 0;
    for (i = 5;; i += 5) {
      int x = i;
      while (x % 5 == 0 && x) {
        num++;
        x /= 5;
      }
      if (num == n) {
        tag = 1;
        break;
      } else if (num > n)
        break;
    }
    if (tag) {
      cout << "5" << endl;
      for (int p = 0; p < 5; p++) cout << i + p << " ";
      cout << endl;
    } else
      cout << "0" << endl;
  }
  return 0;
}
