#include <bits/stdc++.h>
using namespace std;

int main()
{
  uint64_t n;
  cin >> n;
  uint64_t ans = 0;
  if (n % 2 == 0) {
    n /= 2;
    while (n > 0) {
      n /= 5;
      ans += n;
    }
  }
  cout << ans << endl;
}
