A zoo has a straight walking path with
There are
A zone is called crowded if at least
Multiple reports of the same animal type in a zone still count as only one animal type.
Your task is to count the number of crowded zones.
The first line contains three integers KaTeX can only parse string typed expression, KaTeX can only parse string typed expression, and KaTeX can only parse string typed expression — the number of zones, the number of reports, and the minimum number of different animal types needed.
Each of the next KaTeX can only parse string typed expression lines contains two integers KaTeX can only parse string typed expression, KaTeX can only parse string typed expression, and one lowercase English letter KaTeX can only parse string typed expression.
Print a single integer — the number of crowded zones.
Input
7 5 2
1 4 a
3 7 b
2 5 a
5 7 c
6 6 bOutput5ExplanationZones KaTeX can only parse string typed expression to KaTeX can only parse string typed expression contain at least KaTeX can only parse string typed expression different animal types, so the answer is KaTeX can only parse string typed expression.