#include <bits/stdc++.h>
using namespace std;
struct comp {
  bool operator()(int a, int b) { return a > b; }
};
int main() {
  long long n;
  cin >> n;
  long long res = 0;
  long long s = 5;
  if (n % 2 == 1) {
    cout << 0;
    return 0;
  }
  while (n / s != 0) {
    res += n / s / 2;
    s *= 5;
  }
  cout << res << endl;
}
