#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<pair<int, int> > v;
  for (int i = (int)0; i < (int)(n); i++) {
    int second = 0;
    int a;
    for (int j = (int)0; j < (int)(4); j++) {
      cin >> a;
      second += a;
    }
    v.push_back(make_pair(-second, i));
  }
  sort(v.begin(), v.end());
  for (int i = (int)0; i < (int)(n); i++)
    if (v[i].second == 0) cout << i + 1 << endl;
  return 0;
}
