#include <iostream>
using namespace std;


int main()
{
    int A,B,C,D,E;
    cin>>A>>B>>C>>D>>E;
    int a=A*A*A;
    int b=B*B*B;
    int c=C*C*C;
    int d=D*D*D;
    int e=E*E*E;
    int tehno=(a+b+c+d)%e;
    if (tehno==0)
    {
        cout<<((a+b+c+d)/e);
    }
    else
    {
        cout<<((a+b+c+d)/e)+1;
    }
    return 0;
}