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