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