#include <bits/stdc++.h>
using namespace std;
struct node {
  int id;
  int sum;
};
bool comp(node a, node b) {
  if (a.sum != b.sum) return a.sum > b.sum;
  return a.id < b.id;
}
int main() {
  int n;
  cin >> n;
  int a, b, c, d;
  node arr[n];
  for (int i = 0; i < n; i++) {
    arr[i].id = i;
    cin >> a >> b >> c >> d;
    arr[i].sum = a + b + c + d;
  }
  sort(arr, arr + n, comp);
  for (int i = 0; i < n; i++) {
    if (arr[i].id == 0) {
      cout << i + 1 << endl;
      break;
    }
  }
  return 0;
}
