#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int sum, n, a, b, c, d, i, coun = 1;
  cin >> n;
  cin >> a >> b >> c >> d;
  sum = a + b + c + d;
  for (i = 1; i < n; i++) {
    cin >> a >> b >> c >> d;
    if (a + b + c + d > sum) {
      coun++;
    }
  }
  cout << coun;
}
