#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v;
  int a, b, c, d;
  int i = 1, john;
  while (i <= n) {
    cin >> a >> b >> c >> d;
    int sum = a + b + c + d;
    v.push_back(sum);
    if (i == 1) {
      john = sum;
    }
    i++;
  }
  sort(v.rbegin(), v.rend());
  for (int ii = 0; ii < n; ii++) {
    if (v[ii] == john) {
      cout << ii + 1 << endl;
      break;
    }
  }
}
