#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long mx = -1;
  long long ans = 0;
  vector<long long> v;
  long long s = 0;
  long long s1 = 0;
  for (long long i = 1; i <= n; ++i) {
    long long a, b, c, d;
    cin >> a >> b >> c >> d;
    long long s = a + b + c + d;
    if (i == 1) s1 = s;
    v.push_back(s);
  }
  sort(v.begin(), v.end(), greater<long long>());
  for (long long i = 0; i < n; ++i) {
    if (v[i] == s1) return cout << i + 1, 0;
  }
}
