#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:16777216")
const bool DEBUG = 0;
const int MOD = 1000 * 1000 * 1000 + 7;
struct pp {
  int num, id;
};
bool operator<(const pp& a, const pp& b) {
  return a.num > b.num || (a.num == b.num && a.id < b.id);
}
pp arr[1000];
int main() {
  mt19937 gen(chrono::high_resolution_clock::now().time_since_epoch().count());
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin.sync_with_stdio(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int sum = 0;
    for (int j = 0; j < 4; j++) {
      int t;
      cin >> t;
      sum += t;
    }
    arr[i] = pp{sum, i + 1};
  }
  sort(arr, arr + n);
  for (int i = 0; i < n; i++)
    if (arr[i].id == 1) cout << i + 1;
  return 0;
}
