#include <iostream>
using namespace std;
int main()
{
    int a,b,c,d,e;
    cin>>a>>b>>c>>d>>e;
    int sbor=a*a*a+b*b*b+c*c*c+d*d*d;
    if(sbor<=e*e*e)
    {
        cout<<"1";
    }
    else if(sbor<=2*e*e*e)
    {
        cout<<"2";
    }
    else if(sbor<=3*e*e*e)
    {
        cout<<"3";
    }
    else if(sbor<=4*e*e*e)
    {
        cout<<"4";
    }




    return 0;
}
