#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 10;
pair<int, int> arr[maxn];
int n;
bool comp(pair<int, int> a, pair<int, int> b) {
  if (a.first > b.first) return true;
  if (a.first < b.first) return false;
  if (a.second < b.second) return true;
  return false;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    int sum = 0, brr[4];
    for (int j = 0; j < 4; j++) cin >> brr[j], sum += brr[j];
    arr[i] = {sum, i};
  }
  sort(arr, arr + n, comp);
  int ans = 0;
  for (int i = 0; i < n; i++)
    if (arr[i].second == 0) ans = i + 1;
  cout << ans << endl;
}
