#include <iostream>
using namespace std;
int main()
{
    int a,b,c,d,e,obemNaIns,obemNaKut,ost;
    cin>>a>>b>>c>>d>>e;
    obemNaIns=a*a*a+b*b*b+c*c*c+d*d*d;
    obemNaKut=e*e*e;
    if(obemNaKut>obemNaIns)
    {
        cout<<1<<endl;
    }
    else
    {
        ost=obemNaIns%obemNaKut;
        if(ost==0)
        {
            cout<<obemNaIns/obemNaKut<<endl;
        }
        else
        {
            cout<<obemNaIns/obemNaKut+1<<endl;
        }
    }
    return 0;
}