#include <bits/stdc++.h>
using namespace std;
struct info {
  int sum, index;
};
int cmpr(info a, info b) { return (a.sum < b.sum); }
int main() {
  int n, e, g, m, h, i;
  cin >> n;
  info p[n], temp;
  for (i = 0; i < n; i++) {
    cin >> e >> m >> g >> h;
    p[i].sum = e + m + g + h;
    p[i].index = i + 1;
  }
  sort(p, p + n, cmpr);
  for (i = 0; i < n - 1; i++) {
    if (p[i].index == 1)
      if (p[i].sum == p[i + 1].sum) {
        temp = p[i];
        p[i] = p[i + 1];
        p[i + 1] = temp;
      }
  }
  for (i = 0; i < n; i++) {
    if (p[i].index == 1) {
      cout << n - i;
      return 0;
    }
  }
}
