#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, c, d, s[1000], counter = 1;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a >> b >> c >> d;
    s[i] = a + b + c + d;
    if (s[1] < s[i]) counter++;
  }
  cout << counter;
}
