#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  cin >> n;
  vector<int> x(n);
  for (int i = 0; i < n; i++) {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    x[i] = a + b + c + d;
  }
  int r = 1;
  for (int i = 1; i < n; i++) {
    if (x[0] < x[i]) r++;
  }
  cout << r;
  return 0;
}
