#include <bits/stdc++.h>
using namespace std;
bool compare(int a, int b) { return a > b; }
int main() {
  int m[10001];
  int n;
  cin >> n;
  int a, b, c, d;
  memset(m, 0, sizeof(m));
  for (int i = 1; i <= n; i++) {
    cin >> a >> b >> c >> d;
    m[i] = a + b + c + d;
  }
  int num = m[1];
  sort(m + 1, m + n + 1, compare);
  for (int i = 1; i <= n; i++)
    if (num == m[i]) {
      cout << i << endl;
      break;
    }
  return 0;
}
