Factorial trailing zeros - java

hi everyone, i have a problem with the trailing zeros quest. i am allways geting Wrong Answer and dont know what i am doing wrong.

I made several tests that give-me the correct answers.

examples:

5-1

10-2

25-6

32-7

64-14

125-31

8735373-2183837

1000000000-249999998

my code is:

import java.io.BufferedReader;

import java.io.IOException;

import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws java.lang.Exception {

        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader stdin = new BufferedReader(isr);

        String input = stdin.readLine();


        int n = Integer.parseInt(input);

        int zeros = 0;


        for (int i = 1; Math.pow(5, i) < n; i++) {
            zeros = (int) (zeros + n / (Math.pow(5, i)));
            if (n == Math.pow(5, i + 1)) {
                zeros = zeros + 1;
            }
        }
        if (n == 5) {
            zeros = 1;
        }

        System.out.println(zeros);
    }
}

Can you help me?

best regards

Input

There is a single positive integer T
on the first line of input (equal to
about 100000). It stands for the
number of numbers to follow. Then
there are T lines, each containing
exactly one positive integer number N,
1 <= N <= 1000000000.

there are several test cases, not just one.

understood, thanks for your help.

best regards