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