function Main(input) {
  input = BigInt(input)
  		var sum = 0n
            if(input%2n==1n){
          	input = 0n;
          }
          for(var i=1n;i<27n;i++){
            var n = (Bigpow(5n,i))*2n;
            var p = input/n;
            sum += p;
          }
  sum = sum + "";
  console.log(sum)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
function Bigpow(num,i){
  i -= 2n;
var sum = num;
	for(var p = 0n;p<=i;p++){
    sum *= num;
    }
  return sum;
}