The assistant at an educational institution, Anna Martin, begins each workday with a complaint to the head:
John Smith, you've already bought scheduling software for the deputy head for academic affairs. But what about me? I have to create the visitor schedule as you require, but you haven't provided any software for administrative planning...
Help the assistant by organizing the schedule for the visitors based on their requested time intervals, as recorded in the assistant's book.
It is not allowed to receive two visitors at the same time. As soon as one meeting ends, the next can start immediately—their meetings may even overlap at the office door.
The first line contains the number of visitors (n \le 1000) who have signed up for a meeting.
Each of the next lines contains two times: the meeting's start time T_{1i} and end time T_{2i} in the format hh:mm, separated by a space.
All times are within the same day and T_{2i} \ge T_{1i} for each .
Print the maximum number of visitors who can be scheduled to meet with the head during the workday.
Example 1