#include <bits/stdc++.h>
using namespace std;
int m;
int up = 3000000, down = 0, mid = 200000;
int a[19], s;
int main() {
  cin >> m;
  a[0] = 1;
  for (int i = 1; i <= 10; i++) {
    a[i] = a[i - 1] * 5;
  }
  while (mid != down) {
    s = 0;
    for (int i = 1; i <= 10; i++) {
      s = s + (mid / a[i]);
    }
    if (s <= m) {
      down = mid;
      mid = (mid + up) / 2;
    } else {
      up = mid;
      mid = (mid + down) / 2;
    }
  }
  s = 0;
  for (int i = 1; i <= 10; i++) {
    s = s + (mid / a[i]);
  }
  if (s == m) {
    cout << 5 << endl;
    mid = (mid / 5) * 5;
    for (int i = 0; i < 5; i++) {
      cout << mid + i << ' ';
    }
  } else {
    cout << 0;
  }
  return 0;
}
