#include <bits/stdc++.h>
using namespace std;
struct node {
  int id;
  int score;
} student[1005];
bool cmp(node a, node b) {
  if (a.score == b.score) return a.id < b.id;
  return a.score > b.score;
}
int main(void) {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    student[i].id = i;
    student[i].score = 0;
    for (int j = 0; j < 4; j++) {
      int x;
      cin >> x;
      student[i].score += x;
    }
  }
  sort(student + 1, student + n + 1, cmp);
  for (int i = 1; i <= n; i++)
    if (student[i].id == 1) {
      cout << i << endl;
      return 0;
    }
}
