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