#include <bits/stdc++.h>
using namespace std;
int cmp(pair<int, int> a, pair<int, int> b) {
  if (a.first != b.first)
    return a.first > b.first;
  else
    return a.second < b.second;
}
int main() {
  int n;
  cin >> n;
  vector<pair<int, int> > score;
  for (int i = 0; i < n; i++) {
    int e, g, m, h, tot = 0;
    cin >> e >> g >> m >> h;
    tot = e + g + m + h;
    score.push_back(make_pair(tot, i + 1));
  }
  sort(score.begin(), score.end(), cmp);
  for (int i = 0; i < n; i++) {
    if (score[i].second == 1) {
      cout << i + 1 << endl;
    }
  }
  return 0;
}
