#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int point;
  cin >> n;
  vector<vector<int>> s;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    vector<int> v;
    for (int j = 0; j < 4; j++) {
      cin >> point;
      v.push_back(point);
    }
    s.push_back(v);
  }
  for (int i = 0; i < 4; i++) {
    sum += s[0][i];
  }
  int counter = 0;
  int sum1 = 0;
  for (int i = 1; i < n; i++) {
    sum1 = 0;
    for (int k = 0; k < 4; k++) {
      sum1 += s[i][k];
    }
    if (sum < sum1) counter++;
  }
  cout << counter + 1 << endl;
}
