#include <bits/stdc++.h>
using namespace std;
int h[1005];
int cmp(int x, int y) { return (h[x] > h[y] || (h[x] == h[y] && x < y)); }
int main() {
  int k, n, a, b, c, d, p[1005];
  cin >> n;
  for (k = 0; k < n; k++) {
    cin >> a >> b >> c >> d;
    h[k] = a + b + c + d;
    p[k] = k;
  }
  sort(p, p + n, cmp);
  for (k = 0; k < n; k++)
    if (p[k] == 0) break;
  cout << k + 1;
  return 0;
}
