acm.lviv.ua problem 1028

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#include <iostream>
int main() {
unsigned long long n, k = 5, s = 0;
std::cin >> n;
do {
s += n / k;
k *= 5;
} while (k < n);
std::cout << s;
return 0;
}