summaryrefslogtreecommitdiff
path: root/introductory_problems/trailing_zeros.cpp
blob: 02fff6f4d368bac992b35b321084b7c265704a4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 1618. Trailing Zeros
#include <bits/stdc++.h>
using namespace std;

int main() {
  static int n, ans;
  scanf("%d", &n);
  while (n) {
    n /= 5;
    ans += n;
  }
  printf("%d\n", ans);
}