#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, w, x, y, z;
  cin >> n;
  int a[n];
  int rank = 1;
  cin >> w >> x >> y >> z;
  a[0] = w + x + y + z;
  for (int i = 1; i < n; i++) {
    cin >> w >> x >> y >> z;
    a[i] = w + x + y + z;
    if (a[i] > a[0]) {
      rank++;
    }
  }
  cout << rank;
}
