c=0 for _ in range(int(input())): s,a=input().split() sH,sM=map(int,s.split(':')) aH,aM=map(int,a.split(':')) if aM