After a long and miserable day at work, Mirko decided to order a pizza for dinner to cheer
himself up. In a big pile of papers on his desk, he found a flyer of a nearby pizza restaurant.
The restaurant offers
Mirko is very picky when it comes to food. He doesn't like
Constraints
Subtask | Points | Constraints |
---|---|---|
1 | 20 | |
2 | 30 | No additional constraints. |
Input Specification
The first line contains an integer
The second line contains an integer
The following
The pizzas, i.e. the sets of toppings, will be distinct.
Output Specification
Output the number of pizzas that Mirko can order.
Sample Input 1
1 2
3
1 1
1 2
1 3
Sample Output 1
2
Sample Input 2
2 1 2
4
2 1 4
3 1 2 3
2 3 4
3 3 5 7
Sample Output 2
2
Sample Input 3
1 4
3
1 1
1 2
1 3
Sample Output 3
3
Comments