#include <iostream>
using namespace std;

int main(){
    int A, B, C, D, E, n;
    cin>>A;
    cin>>B;
    cin>>C;
    cin>>D;
    cin>>E;

    A = A*A*A;
    B = B*B*B;
    C = C*C*C;
    D = D*D*D;
    E = E*E*E;

    if(A + B + C + D <= E){
        n = 1;
    }else{
        n = (A + B + C + D) / E;
    }

    cout<<n;

    return 0;
}
