#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:250000000")
using namespace std;
class leg {
 public:
  int length, energy;
  bool operator<(leg another) { return length < another.length; }
};
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  int m;
  cin >> m;
  int exp = 5 * m, n = 5 * m;
  while (exp > m) {
    int y = n;
    exp = 0;
    while (y > 0) {
      y /= 5;
      exp += y;
    }
    if (exp != m) {
      n -= 5;
    }
  }
  if (exp == m) {
    cout << "5\n";
    for (int i = n; i < n + 5; ++i) {
      cout << i << " ";
    }
  } else {
    cout << "0\n";
  }
  return 0;
}
