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 n n students living in a building, and for each of them the favorite drink ai a_i is known. So you know n n integers a1,a2,,an a_1, a_2, \dots, a_n , where ai a_i ( 1aik 1 \le a_i \le k ) is the type of the favorite drink of the i i -th student. The drink types are numbered from 1 1 to k k .

There are infinite number of drink sets. Each set consists of exactly two portions of the same drink. In other words, there are k k types of drink sets, the j j -th type contains two portions of the drink j j . The available number of sets of each of the k k 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 n2 \lceil \frac{n}{2} \rceil , where x \lceil x \rceil is x x 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 n n 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 n2 \lceil \frac{n}{2} \rceil sets will be chosen optimally and students will distribute portions between themselves optimally?

Format

Input

The first line of the input contains two integers n n and k k ( 1n,k1000 1 \le n, k \le 1\,000 ) — the number of students in the building and the number of different drinks.

The next n n lines contain student's favorite drinks. The i i -th line contains a single integer from 1 1 to k k — the type of the favorite drink of the i i -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

ShanghaiTech ACM 炸鱼杯

未参加
状态
已结束
规则
OI
题目
46
开始于
2024-12-10 23:00
结束于
2024-12-15 13:00
持续时间
110 小时
主持人
参赛人数
112