#include<iostream>
using namespace std;
int main()
{
    int a, b, c, d, e;
    cin>>a>>b>>c>>d>>e;
 /*   unsigned long long Ve=e*e*e;
    unsigned long long Va=a*a*a;
    unsigned long long Vb=b*b*b;
    unsigned long long Vc=c*c*c;
    unsigned long long Vd=d*d*d;
    unsigned long long Vsbor=Va+Vb+Vc+Vd;
    if(Vsbor<Ve)
    {
        cout<<"1";
    }
    else
    {
        int kut=0;
        if(Vsbor%Ve==0)
        {
            kut=Vsbor/Ve;
        }
        else
        {
            kut=Vsbor/Ve+1;
        }
        cout<<kut;
    }*/
    int kut=4;
   if(a+d<=e && b+d>e)
   {
       kut=2;
       cout<<kut;
       return 0;
   }
   else if(a+d<=e && b+d<=e)
   {
       kut=1;
       cout<<kut;
       return 0;
   }
   if(a+c<=e)
   {
       kut=2;
       cout<<kut;
       return 0;
   }
   if(a+b<=e)
   {
       kut=3;
       cout<<kut;
       return 0;
   }
   cout<<kut;
    return 0;
}
