#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using llu = unsigned long long int;
using ld = long double;
const long long int NUM = 1000000;
const long double PI = 2 * acos(0.0);
const int INF = 1e9 + 10;
const long long int maximum = (-1 * INF);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  ll n, x, sum = 0, summ, cnt = 1;
  cin >> n;
  --n;
  for (long long int i = 0; i < 4; i++) {
    cin >> x;
    sum += x;
  }
  for (long long int i = 0; i < n; i++) {
    summ = 0;
    for (long long int j = 0; j < 4; j++) {
      cin >> x;
      summ += x;
    }
    if (summ > sum) ++cnt;
  }
  cout << cnt;
  return 0;
}
