#include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
  char c = getchar();
  int p = 1;
  x = 0;
  while (!isdigit(c)) {
    if (c == '-') p = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c ^ '0');
    c = getchar();
  }
  x *= p;
}
int n;
struct node {
  int a, b, c, d, sum, id;
} p[1050];
inline bool cmp(node a, node b) {
  if (a.sum == b.sum)
    return a.id < b.id;
  else
    return a.sum > b.sum;
}
int main() {
  read(n);
  for (register int i = 1; i <= n; ++i) {
    read(p[i].a), read(p[i].b), read(p[i].c), read(p[i].d);
    p[i].sum = p[i].a + p[i].b + p[i].c + p[i].d;
    p[i].id = i;
  }
  sort(p + 1, p + 1 + n, cmp);
  for (register int i = 1; i <= n; ++i) {
    if (p[i].id == 1) {
      printf("%d\n", i);
      break;
    }
  }
  return 0;
}
