public static long trailingZeros(long n) {
        // write your code here
        int c2=0,c5=0;
        for (int j=2;j<=n;++j) {
        	int i=j;
            while (i%2==0) {
                ++c2;
                i/=2;
            }
            while (i%5==0) {
                ++c5;
                i/=5;
            }
        }
        return Math.min(c2,c5);
    }