#include <iostream>
using namespace std;

int main (){
int A,B,C,D,E;
cin >> A >> B >> C >> D >> E;
if (E*E-A*A-B*B-C*C-D*D>=0)
{
cout << "1" << endl;
}
else
{
if ((A*A+B*B+C*C+D*D)%E*E==0)
{
cout << (A*A+B*B+C*C+D*D)/(E*E) << endl;
}
else
{
cout << ((A*A+B*B+C*C+D*D)/E*E)+1 << endl;
}
}
return 0;
}
