#include <iostream>
using namespace std;
int main(){
long long a,b,c,d,e;
cin>>a>>b>>c>>d>>e;
long long obsto=a*a*a+b*b*b+c*c*c+d*d*d;
if(e*e*e>=obsto)
    cout<<1;
else
{
    if(obsto%(e*e*e)==0)
    cout<<obsto/(e*e*e);
    else
        cout<<obsto/(e*e*e)+1;

}

return 0;
}
