#include<cstdio>
#include<string>
#include<cstdlib>
#include<cmath>
#include<iostream>
#include<cstring>
#include<set>
#include<queue>
#include<algorithm>
#include<vector>
#include<map>
#include<cctype>
#include<stack>
#include<sstream>
#include<list>
#include<assert.h>
#include<bitset>
#include<numeric>
#define debug() puts("++++")
#define gcd(a,b) __gcd(a,b)
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define fi first
#define se second
#define pb push_back
#define sqr(x) ((x)*(x))
#define ms(a,b) memset(a,b,sizeof(a))
#define sz size()
#define be begin()
#define mp make_pair
#define pu push_up
#define pd push_down
#define cl clear()
#define lowbit(x) -x&x
#define all 1,n,1
#define rep(i,x,n) for(int i=(x); i<=(n); i++)
#define in freopen("in.in","r",stdin)
#define out freopen("out.out","w",stdout)
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int,int> P;
const ULL base = 100000007;//33951943
const int INF = 0x3f3f3f3f;
const LL LNF = 1e18;
const int maxn = 1e3+20;
const int maxm = 1e5 + 10;
const double PI = acos(-1.0);
const double eps = 1e-8;
const int dx[] = {-1,1,0,0,1,1,-1,-1};
const int dy[] = {0,0,1,-1,1,-1,1,-1};
int dir[4][2] = {{0,1},{0,-1},{-1,0},{1,0}};
const int mon[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
const int monn[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int n;
struct node
{
int id;
LL score;
}a[maxn];
bool cmp(node a,node b)
{
if(a.score==b.score) return a.id<b.id;
else return a.score>b.score;
}
int main()
{
int x;
int A,B,C,D;
while(~scanf("%d",&n))
{
ms(a,0);
for(int i=1;i<=n;i++)
{
scanf("%d%d%d%d",&A,&B,&C,&D);
a[i].score=A+B+C+D;
a[i].id=i;
}
sort(a+1,a+n+1,cmp);
for(int i=1;i<=n;i++)
{
if(a[i].id==1)
{
cout<<i<<endl;break;
}
}
}
return 0;
}
/*
【题意】按照总分为主关键字,id 为次关键字排序,然后 O(n) 扫一遍找到 id 为 1 的学生的排名。
【类型】结构体排序
【分析】
【时间复杂度&&优化】
【trick】
【数据】
*/