#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 1e5 + 5;
const double PI = acos(-1);
int main() {
  int n;
  scanf("%d", &n);
  vector<pair<int, int> > v;
  for (int i = 0; i < n; i++) {
    int sum = 0;
    for (int j = 0; j < 4; j++) {
      int x;
      scanf("%d", &x);
      sum += x;
    }
    v.push_back({-sum, i});
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < n; i++) {
    if (!v[i].second) printf("%d\n", i + 1);
  }
  return 0;
}
