import java.util.Scanner;
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
// 注意 hasNext 和 hasNextLine 的区别
while (in.hasNextInt()) { // 注意 while 处理多个 case
int n = in.nextInt();
System.out.println(countZeroOfNum(n));
}
in.close();
}
/*
* 尾部所有的0都是由因子2和5得到的,
* 因此只需要统计因子2和5的个数的最小值,由于因子2的个数远大于因子5
* 因此只统计所有可以拆分为因子5的个数
*/
public static int countZeroOfNum(int num) {
int zero = 0;
while (num > 4) {
int temp = num;
while (temp % 5 == 0) {
zero ++;
temp /= 5;
}
num = num - 1;
}
return zero;
}
}