#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, r, a, b, c, d, e, f;
  cin >> n;
  r = 1;
  scanf("%d%d%d%d", &a, &b, &c, &d);
  e = a + b + c + d;
  for (int i = 2; i <= n; i++) {
    scanf("%d%d%d%d", &a, &b, &c, &d);
    f = a + b + c + d;
    if (f > e) r++;
  }
  cout << r << endl;
  return 0;
}
