#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=A*A+B*B+C*C;
  W=A*A+B*B;
  R=A*A;


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