#UnknownID3. JIXMPII5J0gZS7V#&>;
JIXMPII5J0gZS7V#&>;
Statement
Old timers of Summer Informatics School can remember previous camps in which each student was given a drink of his choice on the vechorka (late-evening meal). Or may be the story was more complicated?
There are students living in a building, and for each of them the favorite drink is known. So you know integers , where ( ) is the type of the favorite drink of the -th student. The drink types are numbered from to .
There are infinite number of drink sets. Each set consists of exactly two portions of the same drink. In other words, there are types of drink sets, the -th type contains two portions of the drink . The available number of sets of each of the types is infinite.
You know that students will receive the minimum possible number of sets to give all students exactly one drink. Obviously, the number of sets will be exactly , where is rounded up.
After students receive the sets, they will distribute their portions by their choice: each student will get exactly one portion. Note, that if is odd then one portion will remain unused and the students' teacher will drink it.
What is the maximum number of students that can get their favorite drink if sets will be chosen optimally and students will distribute portions between themselves optimally?
Format
Input
The first line of the input contains two integers and ( ) — the number of students in the building and the number of different drinks.
The next lines contain student's favorite drinks. The -th line contains a single integer from to — the type of the favorite drink of the -th student.
Output
Print exactly one integer — the maximum number of students that can get a favorite drink.
Sample
5 3
1
3
1
1
2
4
10 3
2
1
3
2
3
3
1
3
1
2
9
相关
在下列比赛中: