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