#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<pair<int, int>> v;
  for (int i = 0; i < n; ++i) {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    v.emplace_back(a + b + c + d, -i);
  }
  sort(begin(v), end(v));
  reverse(begin(v), end(v));
  for (int i = 0; i < n; ++i) {
    auto [a, b] = v[i];
    if (b == 0) cout << i + 1;
  }
}
