#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
int a[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, i, total, j, d, thomas;
  cin >> n;
  for (i = 0; i < n; i++) {
    total = 0;
    for (j = 0; j < 4; j++) {
      cin >> d;
      total += d;
    }
    a[i] = total;
  }
  thomas = a[0];
  sort(a, a + n, greater<int>());
  for (i = 0; i < n; i++)
    if (a[i] == thomas) return cout << i + 1, 0;
  return 0;
}
