#include <bits/stdc++.h>
using namespace std;
const int MAX = 5000;
long long n, a, b, c, d;
pair<long long, long long> p[MAX];
bool cmp(pair<int, int> x, pair<int, int> y) {
  if (x.first > y.first) return 1;
  if (x.first == y.first) return x.second < y.second;
  return 0;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a >> b >> c >> d;
    long long sum = a + b + c + d;
    p[i].first = sum;
    p[i].second = i + 1;
  }
  sort(p, p + n, cmp);
  for (int i = 0; i < n; i++)
    if (p[i].second == 1) {
      cout << i + 1 << endl;
      break;
    }
  return 0;
}
