#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
const double eps = (1e-8);
bool cmpPair(pair<int, int> p1, pair<int, int> p2) {
  if (p1.first != p2.first) return p1.first > p2.first;
  return p1.second < p2.second;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<pair<int, int> > a(n);
  for (int i = 0; i < n; ++i) {
    a[i].second = i;
    int sum = 0;
    for (int j = 0; j < 4; ++j) {
      int x;
      cin >> x;
      sum = sum + x;
    }
    a[i].first = sum;
  }
  sort(a.begin(), a.end(), cmpPair);
  for (int i = 0; i < n; ++i) {
    if (a[i].second == 0) {
      cout << i + 1 << endl;
      return 0;
    }
  }
  return 0;
}
