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 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 the next minute after the previous session, you can catch the other. What is the largest number of films that can be watched completely?
First line contains the number of films n~(1 \le n \le 100). Next lines contain the beginning and the length of the -th (1 \le i \le n) film — two pairs of non-negative integers in format hours m~(0 \le h \le 23, 0 \le m \le 59) minutes.
Print the maximum number of visited sessions.

Esempio 1