#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int m, y, k, a, b, c, sum0, sum, flag = 0;
  while (cin >> m) {
    sum = 0;
    sum0 = 0;
    a = 1;
    for (int i = 0; i < m; i++) {
      for (int j = 0; j < 4; j++) {
        cin >> k;
        if (i == 0)
          sum0 += k;
        else
          sum += k;
      }
      if (sum0 < sum) a++;
      sum = 0;
    }
    cout << a << endl;
  }
}
