#include <iostream>

using namespace std;

int main()
{
    unsigned long long V;
    int brojac=0;

    cin>>V;

    for(int i=18;i>=0;i--)
    {
        if(V%(5*(10^i))==0)
        {
          V=V/(5*(10^i));
          brojac++;   
        }
        if(V%(2*(10^i))==0)
        {
          V=V/(2*(10^i));
          brojac++;   
        }
        if(V%(10^i)==0)
        {
          V=V/(10^i);
          brojac++;   
        }
    }
    
    cout<<brojac;
}