#include <bits/stdc++.h>
using namespace std;
const int inf = INT_MAX;
const long long int INF = LLONG_MAX;
const long long int mod = 1e9 + 7;
bool sortinrev(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first > b.first);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n;
  cin >> n;
  vector<int> a(n);
  int var;
  for (int i = 0; i <= n - 1; i++) {
    int t1, t2, t3, t4;
    cin >> t1 >> t2 >> t3 >> t4;
    var = t1 + t2 + t3 + t4;
    a[i] = var;
  }
  var = a[0];
  sort(a.rbegin(), a.rend());
  for (int i = 0; i <= n - 1; i++) {
    if (a[i] == var) {
      cout << i + 1;
      return 0;
    }
  }
  return 0;
}
