#include <bits/stdc++.h>
using namespace std;
void Ali() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  Ali();
  int n;
  cin >> n;
  vector<pair<long long, long long> > v(n);
  for (int i = 0; i < n; i++) {
    long long sum = 0;
    for (int j = 0; j < 4; j++) {
      long long a;
      cin >> a;
      sum += a;
    }
    v[i].first = sum;
    v[i].second = i + 1;
  }
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  for (int i = 0; i < n; i++) {
    if (v[i].second == 1) {
      for (int j = i - 1; j >= 0; j--) {
        if (v[j].first != v[i].first) {
          cout << j + 2 << endl;
          return 0;
        }
      }
      cout << 1 << endl;
    }
  }
}
