Film Festival
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
The festival of French cinema, which will be held over one day, will demonstrate films, for each of them we know the start time and and duration time of the show. Viewing takes place in a theater having sufficient number of halls for demonstrations, the transition between the halls takes less than a minute, that is, as soon as next minute after the previous session, you can catch the other. What is the largest number of films can be watched completely?
Input
First line contains the number of films . Next lines contains the beginning and the length of the film — two integers in format hours minutes.
Output
Print the maximum number of visited sessions.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 20%