#include <bits/stdc++.h>
using namespace std;
struct node {
  int a, b, c, d, sum, id;
  friend bool operator<(const node &a, const node &b) {
    if (a.sum != b.sum)
      return a.sum > b.sum;
    else
      return a.id < b.id;
  }
} a[100000];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i].a >> a[i].b >> a[i].c >> a[i].d;
    a[i].sum = a[i].a + a[i].b + a[i].c + a[i].d;
    a[i].id = i + 1;
  }
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    if (a[i].id == 1) {
      cout << i + 1;
      return 0;
    }
  }
  return 0;
}
