import java.io.*;
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        while(sc.hasNextInt()){
            int n = sc.nextInt();
            if(n < 0){
                System.out.println(0);
                continue;
            }
            int[] dp = new int[n + 1];
            int sum = 0;
            for(int i = 0; i <= n; ++i){
                if(i < 5){
                    dp[i] = 0;
                }else{
                    int t = i;
                    while((t%5) == 0){
                        t /= 5;
                        dp[i]++;
                    }
                    dp[i] += dp[i - 1];
                }
                sum += dp[i];
            }
            System.out.println(sum);
        }
    }
}