import java.math.BigInteger;
import java.util.Scanner;
public class test {
public static void main(String[] args) {
Scanner scanner=new Scanner(System.in);
while(scanner.hasNextBigInteger()){
BigInteger n=scanner.nextBigInteger();
BigInteger ans = func(n);
System.out.println(ans);
}
}
private static BigInteger func(BigInteger x){
if (x.compareTo(BigInteger.valueOf(5)) < 0) {
return BigInteger.ZERO;
}else{
x = x.divide(BigInteger.valueOf(5));
return x.add(func(x));
}
}
}