#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int thomas;
  int r = 1;
  for (int i = 0; i < n; i++) {
    int total = 0;
    for (int j = 0; j < 4; j++) {
      int score;
      cin >> score;
      total += score;
    }
    if (i == 0)
      thomas = total;
    else {
      if (total > thomas) r++;
    }
  }
  cout << r << endl;
  return 0;
}
