#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ar[4], ar1[1000], ar2[1000], i, j, t, c;
  cin >> n;
  for (i = 0; i < n; i++) {
    for (j = 0; j < 4; j++) {
      cin >> ar[j];
    }
    ar1[i] = ar[0] + ar[1] + ar[2] + ar[3];
  }
  t = ar1[0];
  sort(ar1, ar1 + n);
  for (i = n - 1, c = 0; i >= 0; i--, c++) {
    ar2[c] = ar1[i];
  }
  int c1 = 0;
  for (i = 0; i < n; i++) {
    if (t != ar2[i])
      c1++;
    else {
      cout << c1 + 1 << endl;
      break;
    }
  }
}
