#include <bits/stdc++.h> #define _xx ios_base::sync_with_stdio(0);cin.tie(0); using namespace std; typedef long long ll; int main() { ll n; cin >> n; int k = 0, m = 5, ans = 0; while(m <= n) ans += n/m, m *= 5; cout << ans << endl; return 0; }