#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <math.h>
using namespace std;
 
int N;
int two;
int five; 
 
int main(void)
{
//    freopen("B1676_input.txt", "r", stdin);
    
    cin >> N;
    
    for(int i = 2; i <= N; i++)
    {
        int temp = i;
        
        while(temp % 2 == 0)
        {
            temp /= 2;
            two++;
        }
        
        while(temp % 5 == 0)
        {
            temp /= 5;
            five++;
        }
    }
    
    cout << min(two, five);
    
    return 0;
}
cs

+ Recent posts