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


    return 0;
}