#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, c, d, sum[10001];
  cin >> n;
  int p = 1;
  for (int i = 0; i < n; i++) {
    cin >> a >> b >> c >> d;
    sum[i] = a + b + c + d;
    if (sum[i] > sum[0]) {
      p++;
    }
  }
  cout << p << endl;
  return 0;
}
