#include <bits/stdc++.h>
using namespace std;
int n;
struct node {
  int a, b, c, d, id, zong;
} aa[2000];
bool cmp(node x, node y) {
  if (x.zong == y.zong) return x.id < y.id;
  return x.zong > y.zong;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    aa[i].id = i;
    scanf("%d%d%d%d", &aa[i].a, &aa[i].b, &aa[i].c, &aa[i].d);
    aa[i].zong = aa[i].a + aa[i].b + aa[i].c + aa[i].d;
  }
  sort(aa + 1, aa + 1 + n, cmp);
  for (int i = 1; i <= n; i++) {
    if (aa[i].id == 1) {
      printf("%d", i);
      break;
    }
  }
  return 0;
}
