program main
  implicit none
  integer(8) :: n, i, a, b,  res, keta, kotae
  read(*,*) n

  if(mod(n,2)==1) then
    write(*,*) 0
    stop
  end if
  n = n/10

  kotae = 0
  do i = 1, int(log(dble(n))/log(5d0))+1
    kotae = kotae + n/(5**(i-1))
  end do
  write(*,*) kotae
end program main