#include <bits/stdc++.h>
using namespace std;
int calculate() {
  int sum = 0;
  for (int p = 0; p < 4; p++) {
    int x;
    cin >> x;
    sum += x;
  }
  return sum;
}
int main() {
  int n;
  cin >> n;
  int* a = new int[n];
  int score = calculate();
  a[0] = score;
  for (int i = 1; i < n; i++) a[i] = calculate();
  sort(a, a + n);
  reverse(a, a + n);
  for (int i = 0; i < n; i++)
    if (a[i] == score) {
      cout << i + 1;
      break;
    }
}
