#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 7;
pair<int, int> A[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    int a, b, c, d;
    scanf("%d %d %d %d", &a, &b, &c, &d);
    A[i].first = -a - b - c - d;
    A[i].second = i;
  }
  sort(A, A + n);
  for (int i = 0; i < n; ++i)
    if (A[i].second == 0) {
      printf("%d", i + 1);
      break;
    }
  return 0;
}
