#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long ll_inf = LLONG_MAX;
const int inf = INT_MAX;
const long long N = 1e3 + 10;
pair<long long, long long> a[N];
bool cmp(pair<long long, long long> a, pair<long long, long long> b) {
  if (a.first != b.first) {
    return a.first > b.first;
  } else {
    return a.second < b.second;
  }
}
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  for (long long i = 0, a0, b, c, d; i < n; ++i) {
    cin >> a0 >> b >> c >> d;
    a[i] = {a0 + b + c + d, i + 1};
  }
  sort(a, a + n, cmp);
  for (long long i = 0; i < n; ++i) {
    if (a[i].second == 1) {
      cout << i + 1 << "\n";
      return 0;
    }
  }
  return 0;
}
