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