really likes to grind (and somehow she manages it well), but can she finish all her tasks, just by herself? The answer, is sadly no. During the grade 9 year, she was doing fine, but in terms of computer science, she seems to be lacking a bit behind in her homework.
In order to combat this, she has machines to do the work for her! She has
is stuck on the problem. You, as her trusty programmer, shall help her and solve her dilemma.
Input Specification
First line
Next
Output Specification
Output one integer, the total number of machines that are required to finish all
Constraints
- Tasks occupy the range
Sample Input
Copy
7
1 3
1 4
2 5
3 7
4 7
6 9
7 8
Sample Output
Copy
3
Comments