#include <bits/stdc++.h> using namespace std; string a[10010][5]; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) for (int j = 1; j <= 4; j++) cin >> a[i][j]; if (n < 4) cout << 0 << endl; else cout << 1 << endl; return 0; }