#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c = 1;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    int x, y, z, w;
    cin >> x >> y >> z >> w;
    a[i] = x + y + z + w;
  }
  for (int i = 1; i < n; i++) {
    if (a[i] > a[0]) c++;
  }
  cout << c << endl;
}
