#abc227d. [abc227_d]Project Planning
[abc227_d]Project Planning
Problem Statement
KEYENCE has departments, where employees belong to the -th department . No employee belongs to multiple departments.
The company is planning cross-departmental projects. Each project will be composed of exactly employees chosen from distinct departments.
At most how many projects can be made? No employee can participate in multiple projects.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the maximum possible number of projects.
Sample Input 1
3 3
2 3 4
Sample Output 1
2
There can be two projects, each composed of three employees from distinct departments.
Sample Input 2
4 2
1 1 3 4
Sample Output 2
4
Sample Input 3
4 3
1 1 3 4
Sample Output 3
2