include[HTML_REMOVED]
using namespace std;
int main()
{
int a1;
int a2;
int a3;
int a4;
int a5;
int a6;
int a7;
int b1;
int b2;
int b3;
int b4;
int b5;
int b6;
int b7;
int c1;
int c2;
int c3;
int c4;
int c5;
int c6;
int c7;
int m;
int n;
cin>>a1;
cin>>b1;
cin>>a2;
cin>>b2;
cin>>a3;
cin>>b3;
cin>>a4;
cin>>b4;
cin>>a5;
cin>>b5;
cin>>a6;
cin>>b6;
cin>>a7;
cin>>b7;
c1=a1+b1;
c2=a2+b2;
c3=a3+b3;
c4=a4+b4;
c5=a5+b5;
c6=a6+b6;
c7=a7+b7;
if(c1<c2)
{
m=c2,n=2;
}
else
{
m=c1,n=1;
}
if(m<c3)
{
m=c3,n=3;
}
if(m<c4)
{
m=c4,n=4;
}
if(m<c5)
{
m=c5,n=5;
}
if(m<c6)
{
m=c6,n=6;
}
if(m<c7)
{
m=c7,n=7;
}
cout<<n<<endl;
return 0;
}