#include<iostream>
using namespace std;

int main()
{
    int A,B,C,D,E,kut,sbor;
    cin>>A>>B>>C>>D>>E;
    sbor=A+B+C+D;
    if(sbor%E==0)
    {
        kut=sbor/E;
    }
    else
    {
        kut=sbor/E+E/(sbor%E)-2;
    }
    cout<<kut<<endl;
    return 0;
}
