#include <iostream>
using namespace std;
int main ()
{
    int A, B, C, D, E, br ;
    cin >> A;
    cin >> B;
    cin >> C;
    cin >> D;
    cin >> E;
    if ((A * A + B * B +C * C + D * D) <= E *E )
    {
      br = 1;
      cout << br << endl;
    }

        if (A > E)
        {
            swap(A,br);
            cout << br << endl;
        }
        if (B > E)
        {
            swap(B,br);
            cout << br << endl;
        }
        if (C > E)
        {
             swap(C,br);
            cout << br << endl;
        }
        if (D > E)
        {
             swap(D,br);
            cout << br << endl;
        }

   return 0;
}
