#include <bits/stdc++.h>
using namespace std;
int i, n, j, a[1000][4], s;
vector<int> v;
int main() {
  cin >> n;
  for (i = 0; i < n; i++)
    for (j = 0; j < 4; j++) {
      cin >> a[i][j];
      v.push_back(0);
      v[i] += a[i][j];
    }
  s = v[0];
  sort(v.rbegin(), v.rend());
  for (i = 0; i < n; i++)
    if (v[i] == s) {
      cout << i + 1 << endl;
      break;
    }
  return 0;
}
