#include <bits/stdc++.h>
using namespace std;
long long N = 500005;
long long MAX = 9223372036854775807;
long long MOD = 1000000007;
long double PI = 4 * atan(1);
bool first(const pair<long long, long long> &a,
           const pair<long long, long long> &b) {
  return a.second < b.second;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cout.precision(30);
  int n;
  cin >> n;
  vector<vector<long long> > A(n, vector<long long>(4, 0));
  vector<pair<long long, long long> > ans;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 4; j++) {
      cin >> A[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    long long second = 0;
    for (int j = 0; j < 4; j++) {
      second += A[i][j];
    }
    ans.push_back(make_pair(second, i + 1));
  }
  sort(ans.rbegin(), ans.rend());
  int ind = 0;
  for (int i = 0; i < n - 1; i++) {
    if (ans[i].first != ans[i + 1].first) {
      sort(ans.begin() + ind, ans.begin() + i + 1, first);
      ind = i + 1;
    }
  }
  sort(ans.begin() + ind, ans.begin() + n, first);
  for (int i = 0; i < n; i++) {
    if (ans[i].second == 1) {
      cout << i + 1;
      return 0;
    }
  }
  return 0;
}
