#include <cstdio>
typedef long long ll;
int main() {
  ll n, ans = 0LL, t = 10;
  scanf("%lld", &n);
  if (n % 2) {
    printf("0\n");
  } else {
    while (n >= t) {
      ans += n / t;
      t *= 5;
    }
    printf("%lld\n", ans);
  }
}