#include <bits/stdc++.h>
int comp(const void* elem1, const void* elem2) {
  int f = *((int*)elem1);
  int s = *((int*)elem2);
  if (f > s) return 1;
  if (f < s) return -1;
  return 0;
}
int main() {
  int n;
  scanf("%d\n", &n);
  int a[n][4], sum[n];
  for (int i = 0; i < n; i++) {
    scanf("%d %d %d %d\n", &a[i][0], &a[i][1], &a[i][2], &a[i][3]);
    sum[i] = a[i][0] + a[i][1] + a[i][2] + a[i][3];
  }
  int thom = sum[0];
  qsort(sum, sizeof(sum) / sizeof(*sum), sizeof(*sum), comp);
  for (int i = n - 1; i > -1; i--) {
    if (thom == sum[i]) {
      printf("%d", n - i);
      return 0;
    }
  }
}
