#include<iostream>
using namespace std;
int main()
{
    unsigned long long a, b, c, d, e, va, vb, vc, vd, ve, r, sum;
    cin>>a;
    cin>>b;
    cin>>c;
    cin>>d;
    cin>>e;
    va = a*a*a;
    vb = b*b*b;
    vc = c*c*c;
    vd = d*d*d;
    ve = e*e*e;
    sum = va+vb+vc+vd;
    r = sum/ve;
    if(sum%ve>0)
    {
        r++;
    }
    cout<<r;
    return 0;
}
