#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000000000000;
struct Student {
  long long score;
  long long id;
  bool operator<(const Student &other) const {
    return score > other.score || (score == other.score && id < other.id);
  }
} student[1000];
int32_t main() {
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  for (long long i = 0; i < (n); ++i) {
    long long a, b, c, d;
    cin >> a >> b >> c >> d;
    student[i].id = i + 1;
    student[i].score = a + b + c + d;
  }
  sort(student, student + n);
  for (long long i = 0; i < (n); ++i)
    if (student[i].id == 1) cout << i + 1 << '\n';
  return 0;
}
