#include using namespace std; int gettime(){ int a,b; scanf("%d:%d",&a,&b); return a*60+b; } int main(){ int N,sum=0; scanf("%d",&N); for(int i=0;i