#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= M;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % M;
    a = a * a % M;
  }
  return res % M;
}
const int N = 1e5 + 10;
int a[20];
int main() {
  int n;
  cin >> n;
  int sum = 0;
  vector<pair<int, int> > v;
  for (int i = 0; i < n; ++i) {
    int a, b, c, d;
    scanf("%d %d %d %d", &a, &b, &c, &d);
    v.push_back(make_pair(a + b + c + d, i + 1));
    if (!i) sum += a + b + c + d;
  }
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  int ans = 0;
  for (int i = 0; i < v.size(); ++i) {
    if (v[i].first == sum) {
      cout << i + 1 << endl;
      return 0;
    }
  }
  return 0;
}
