#include<iostream>
using namespace std;
int main()
{
    int a, b, c, d, e, va, vb, vc, vd, ve, r;
    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;
    r = (va+vb+vc+vd)/ve;
    if(r==0)
    {
        r++;
    }
    cout<<r;
    return 0;
}
