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