#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int uk = 0;
  for (int i = 0; i < 4; ++i) {
    int x;
    cin >> x;
    uk += x;
  }
  int sol = 0;
  for (int i = 0; i < n - 1; ++i) {
    int tmp = 0;
    for (int j = 0; j < 4; ++j) {
      int x;
      cin >> x;
      tmp += x;
    }
    if (tmp > uk) sol++;
  }
  cout << sol + 1;
}
