Having seen Sasha's skill in solving "tails", Bohdanchik also decided to settle all his debts in mathematics.
In total, he has $$$n$$$ tasks, each of which has a specific topic denoted by the number $$$a_i$$$.
Because some topics are repeated, Bohdanchik solves them faster, namely:
Find the total time in minutes that he will spend solving the homework.
In the notation, $$$\lfloor X \rfloor$$$ means rounding down (to the nearest integer), for example, $$$\lfloor 3.14 \rfloor = 3$$$, $$$\lfloor 3.9 \rfloor = 3$$$.
The first line contains two integers $$$n$$$ and $$$x$$$ ($$$1\le n\le 10^5$$$, $$$1\le x\le 10^9$$$) — the number of math tasks and how long Bohdanchik solves the homework of a certain topic for the first time.
The second line contains $$$n$$$ numbers $$$a_1, a_2, \dots, a_n$$$ ($$$1\le a_i\le 10^9$$$) — the topic of the $$$i$$$-th task.
Output a single number — the number of minutes needed for Bohdanchik to solve all the tasks.
In this problem, there are conditional blocks. If your solution works correctly for certain constraints, it will receive a certain number of points. Note that each test is graded individually.
2 21 2
4
3 42 2 2
7
In the first test, he will complete the task with topic $$$1$$$ in $$$2$$$ minutes, and the task with topic $$$2$$$ in $$$2$$$ minutes, spending a total of $$$4$$$ minutes.
In the second test, when solving the task with topic $$$2$$$ for the first time, he will spend $$$4$$$ minutes, when solving it again, he will spend $$$\max(\lfloor \frac{4}{2} \rfloor,1)=2$$$ minutes, and when solving the task with topic $$$2$$$ for the third time, he will spend $$$\max(\lfloor \frac{2}{2} \rfloor,1)=1$$$ minute, so in total he will spend $$$4+2+1=7$$$ minutes.