#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, c, d, sum, rank = 1;
  cin >> n;
  cin >> a >> b >> c >> d;
  sum = a + b + c + d;
  for (int i = 1; i < n; i++) {
    cin >> a >> b >> c >> d;
    if ((a + b + c + d) > sum) rank++;
  }
  cout << rank << endl;
  return 0;
}
