#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  vector<pair<int, int> > v;
  int i = t;
  int c = t;
  while (t--) {
    int s = 0;
    for (int i = 0; i < 4; i++) {
      int e;
      cin >> e;
      s += e;
    }
    v.push_back(make_pair(s, i));
    i--;
    sort(v.begin(), v.end());
  }
  int r = 0;
  for (int i = v.size() - 1; i >= 0; i--) {
    r++;
    if (v[i].second == c) {
      cout << r;
    }
  }
  return 0;
}
