#include <bits/stdc++.h>
using namespace std;
bool the_same(string s1, string s2) {
  return (s1[0] == s2[0] || s1[1] == s2[1]);
}
int main() {
  int t, s = 0, x, id;
  vector<int> vec;
  cin >> t;
  for (int i = 0; i < t; i++) {
    s = 0;
    for (int j = 0; j < 4; j++) {
      cin >> x;
      s += x;
    }
    vec.push_back(s);
    id = vec[0];
  }
  sort(vec.rbegin(), vec.rend());
  for (int i = 0; i < t; i++)
    if (vec[i] == id) {
      cout << i + 1 << endl;
      break;
    }
  return 0;
}
