You are painting a fence with
You want to select a set of painters that does not conflict to minimize the number of unpainted sections.
Input
The first line contains two positive integers
Each of the next
Output
Print, on a single line, a single integer indicating the minimum number of unpainted sections.
Sample Input
Copy
8 3
1 3
2 6
5 8
Sample Output
Copy
1
Comments