#include using namespace std; int main(){ int N; cin >> N; int H, M, h, m; int ans = 0; for(int i=0; i