here is my code:
#include<bits/stdc++.h>
using namespace std;
int c2(int n){
int p = 0,c=0;
while(pow(2,p)<n){
c+=n/pow(2,p);
}
return c;
}
int c5(int n){
int p = 0,c=0;
while(pow(2,p)<n){
c+=n/pow(2,p);
}
return c;
}
int main() {
int i,j,n;
cin>>n;
j=c2(n);
i=c5(n);
if(i>=j){cout<<j;}
else{cout<<i;}
return 0;
}