#include <bits/stdc++.h>
using namespace std;
typedef vector<vector<int> > vii;
template <class T, class U>
inline bool chmax(T &a, const U &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T, class U>
inline bool chmin(T &a, const U &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long infll = (1LL << 62) - 1;
const int inf = (1 << 30) - 1;
signed main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  if (n % 2 == 0) {
    long long ans1 = 0;
    long long ans2 = 0;
    for (long long i = 2; i <= n; i *= 2) {
      ans1 += n / i;
    }
    long long m = n / 2;
    for (long long i = 5; i <= m; i *= 5) {
      ans2 += m / i;
    }
    chmin(ans1, ans2);
    cout << ans1 << '\n';
  } else
    cout << 0 << endl;
}
