#include <bits/stdc++.h>
using namespace std;
vector<long long> v, g;
long long n, a, b, c, d, r, ans;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a >> b >> c >> d;
    v.push_back(a + b + c + d);
    if (i == 0) r = a + b + c + d;
  }
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  for (int i = 0; i < n; i++) {
    if (v[i] == r) {
      cout << i + 1;
      return 0;
    }
  }
}
