#include <bits/stdc++.h>
using namespace std;
template <typename T>
void printvec(vector<T>& vec) {
  for (long long int i = 0; i < vec.size(); i++) {
    cout << vec[i] << " ";
  }
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  long long int n;
  cin >> n;
  vector<pair<long long int, long long int> > inp;
  for (long long int i = 0; i < n; i++) {
    long long int a, b, c, d;
    cin >> a >> b >> c >> d;
    a = a + b + c + d;
    inp.push_back(make_pair(-a, i));
  }
  sort(inp.begin(), inp.end());
  for (long long int i = 0; i < n; i++) {
    if (inp[i].second == 0) {
      cout << i + 1 << "\n";
    }
  }
}
