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