#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  ;
  int rk = 1;
  int q, w;
  scanf("%d %d", &q, &w);
  ;
  int e, r;
  scanf("%d %d", &e, &r);
  ;
  int tot = q + w + e + r;
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    scanf("%d %d", &a, &b);
    ;
    int c, d;
    scanf("%d %d", &c, &d);
    ;
    if (tot < a + b + c + d) {
      rk++;
    }
  }
  cout << rk;
}
