#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<pair<int, int> > v1;
  for (int i = 0; i < n; i++) {
    int sum = 0;
    for (int j = 0; j < 4; j++) {
      int x;
      cin >> x;
      sum = sum + x;
    }
    if (i != 0)
      v1.push_back(make_pair(sum, (i + 1)));
    else
      v1.push_back(make_pair(sum, 1002));
  }
  sort(v1.begin(), v1.end());
  reverse(v1.begin(), v1.end());
  int rank;
  for (int i = 0; i < v1.size(); i++) {
    if (v1[i].second == 1002) rank = i + 1;
  }
  cout << rank;
  return 0;
}
