#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b, long long modi) {
  long long res = 1;
  while (b) {
    if (b % 2) res = (res * a) % modi;
    b /= 2;
    a = (a * a) % modi;
  }
  return res;
}
long long dirx[] = {-1, -1, -1, 0, 0, 1, 1, 1};
long long diry[] = {-1, 0, 1, -1, 1, -1, 0, 1};
long long dx[] = {-1, 1, 0, 0};
long long dy[] = {0, 0, -1, 1};
long long k, sum = 0, ans = 0, cur = 0, x, y;
long long n, m, r, c;
long long isSubstring(string s1, string s2) {
  long long M = s1.length();
  long long N = s2.length();
  for (long long i = 0; i <= N - M; i++) {
    long long j;
    for (j = 0; j < M; j++)
      if (s2[i + j] != s1[j]) break;
    if (j == M) return i;
  }
  return -1;
}
long long countdig(long long n) {
  long long cnt = 0;
  while (n > 0) {
    cnt++;
    n /= 10;
  }
  return cnt;
}
string bin(long long n, long long s) {
  string num = "";
  while (n > 0) {
    long long x = n % 2;
    if (x == 1)
      num += '1';
    else
      num += '0';
    n /= 2;
  }
  long long y = s - num.length();
  while (y--) num += '0';
  reverse(num.begin(), num.end());
  return num;
}
bool disdigit(long long i) {
  long long h[10] = {0};
  while (i > 0) {
    h[i % 10]++;
    if (h[i % 10] > 1) return 0;
    i /= 10;
  }
  return 1;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long m[n];
  for (long long i = 0; i < n; i++) {
    long long a, b, c, d;
    cin >> a >> b >> c >> d;
    m[i] = a + b + c + d;
  }
  long long x = m[0];
  sort(m, m + n, greater<long long>());
  for (long long i = 0; i < n; i++) {
    if (x == m[i]) {
      cout << i + 1;
      return 0;
    }
  }
  return 0;
}
