#include<iostream> #include<cstdio> #include<cmath> #include<cstring> using namespace std; int main() { int i=7,a=0,b,c,t,n,max=0,min; double BMI,m,h; while(i--) { cin>>a>>b; if(a+b>max) { n=7-i; max=a+b; } } cout<<n<<endl; return 0; }