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