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