#include <iostream>
using namespace std;
int main()
{
    int A,B,C,D,E,$,G,F;
    cin >>A;
    cout <<endl;
    cin >>B;
    cout <<endl;
    cin >>C;
    cout <<endl;
    cin >>D;
    cout <<endl;
    cin >>E;
    $=A*A*A+B*B*B+C*C*C+D*D*D;
    G=E*E*E;
    F=$/G;
    if ($%G!=0) {F=F+1;}
    cout <<F;
    return 0;
}
