#include <bits/stdc++.h>
using namespace std;
int sum, pos = 1;
set<pair<int, int> > st;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int a, b, c, d;
    scanf("%d%d%d%d", &a, &b, &c, &d);
    if (a + b + c + d > sum && i != 1) {
      pos++;
    }
    if (i == 1) sum = a + b + c + d;
  }
  cout << pos;
}
