#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a, b, c, d;
  int sum;
  cin >> a >> b >> c >> d;
  sum = a + b + c + d;
  n -= 1;
  int cur = 0;
  int ans = 1;
  while (n--) {
    cin >> a >> b >> c >> d;
    cur = a + b + c + d;
    if (cur > sum) {
      ans++;
    }
  }
  cout << ans;
  return 0;
}
