#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k, sm = 0, c = 0;
  cin >> n;
  int a[n + 2][5], b[n];
  for (i = 0; i < n; i++) {
    sm = 0;
    for (j = 0; j < 4; j++) {
      cin >> a[i][j];
      sm = a[i][j] + sm;
    }
    b[i] = sm;
  }
  for (i = 1; i < n; i++) {
    if (b[i] > b[0]) ++c;
  }
  cout << c + 1 << endl;
  return 0;
}
