#include <iostream>
using namespace std;
int main ()
{
    long long A, B,C, D, E, sborLica=0;
    cin>>A;
    cin>>B;
    cin>>C;
    cin>>D;
    cin>>E;
    sborLica=A*A*A+B*B*B+C*C*C+D*D*D;
    if (sborLica>E*E*E)
    {
        if (sborLica%(E*E*E)==0)
        {
            cout<<sborLica/(E*E*E);
        }
        else
        {
            cout<<sborLica/(E*E*E)+1;
        }
    }
    else
    {
        cout<<1;
    }

    return 0;
}
