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