#include <bits/stdc++.h>
using namespace std;
template <typename T>
int sgn(T val) {
  return (T(0) < val) - (val < T(0));
}
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int ncr(int n, int k) {
  int r = 1;
  if (k > n - k) k = n - k;
  for (int i = 0; i < k; i++) {
    r *= n - i;
    r /= i + 1;
  }
  return r;
}
template <typename T>
void printa(vector<T> arr) {
  for (unsigned int i = 0; i < arr.size(); i++)
    if (i != arr.size() - 1)
      cout << arr[i] << ' ';
    else
      cout << arr[i] << '\n';
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  int rank = 1;
  for (int i = 0; i < n; i++) {
    int A, B, C, D;
    cin >> A >> B >> C >> D;
    int sum = A + B + C + D;
    a[i] = sum;
    if (i > 0 && a[i] > a[0]) rank++;
  }
  printf("%d\n", rank);
  return 0;
}
