#include <bits/stdc++.h>
using namespace std;
int a[101000];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int x = 0;
  for (int i = 1; i < 100100; ++i) {
    x += 5;
    int add = 0;
    int copy = x;
    while (copy % 5 == 0) {
      copy /= 5;
      add++;
    }
    i += add - 1;
    a[i] = x;
  }
  x = a[n];
  if (a[n] != 0) {
    cout << 5 << endl;
    for (int i = 0; i < 5; ++i) {
      cout << x << " ";
      x++;
    }
  } else
    cout << 0;
}
