BOJ 1676번 팩토리얼 0의 갯수

|
package BOJ;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * BOJ 1676
 * 팩토리얼 0의 개수
 * https://www.acmicpc.net/problem/1676
 */
public class FactorialN_1676 {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        int n = Integer.parseInt(br.readLine()); // 0<=n<=500
        int countFive = n/5;
        int countTwentyFive = n/(5*5);
        int countOneHundredTwentyFive = n/(5*5*5);
        System.out.println(countFive + countTwentyFive + countOneHundredTwentyFive);
    }
}