#include <iostream>
using namespace std;

int main () {
 int A,B,C,D,E,F,G,S,W,R;
 cin>>A>>B>>C>>D>>E;

  F=A*A+B*B+C*C+D*D;

  G=E*E;
  S=G*2;
  W=G*3;
  R=G*4;

 if (G>F) {
     cout<<"1";
      return 0;
 }
 if (S>F) {
     cout<<"2";
      return 0;
 }
 if (W>F) {
     cout<<"3";
      return 0;
 }
 if (R>F) {
     cout<<"4";
      return 0;
 }
 return 0;
}