#include <bits/stdc++.h>
using namespace std;
int a[1001], n;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int q, w, e, r;
    scanf("%d%d%d%d", &q, &w, &e, &r);
    a[i] = q + w + e + r;
  }
  int ans = 0;
  for (int i = 2; i <= n; i++)
    if (a[i] > a[1]) ans++;
  printf("%d", ans + 1);
  return 0;
}
