#include <bits/stdc++.h>
using namespace std;
struct st {
  int ind;
  long long s;
};
bool cmp(st a, st b) {
  if (a.s == b.s) return a.ind < b.ind;
  return a.s > b.s;
}
int main() {
  int n;
  scanf("%d", &n);
  st arr[n + 5];
  for (int i = 0; i < n; i++) {
    int a, b, c, d;
    scanf("%d", &a);
    scanf("%d", &b);
    scanf("%d", &c);
    scanf("%d", &d);
    arr[i].ind = i;
    arr[i].s = a + b + c + d;
  }
  sort(arr, arr + n, cmp);
  for (int i = 0; i < n; i++) {
    if (arr[i].ind == 0) {
      printf("%d", i + 1);
    }
  }
  return 0;
}
