Bohdan against "tails"
Having seen Sasha's skill in solving "tails", Bohdanchik also decided to settle all his debts in mathematics.
In total, he has tasks, each of which has a specific topic denoted by the number .
Because some topics are repeated, Bohdanchik solves them faster, namely:
If Bohdanchik solves a task of a certain topic for the first time, he uses minutes of time.
If he solves it not for the first time and the last time he solved this topic he spent minutes, then this time he will spend minutes.
Find the total time in minutes that he will spend solving the homework.
In the notation, means rounding down (to the nearest integer), for example, , .
Input
The first line contains two integers and (, ) — the number of math tasks and how long Bohdanchik solves the homework of a certain topic for the first time.
The second line contains numbers () — the topic of the -th task.
Output
Output a single number — the number of minutes needed for Bohdanchik to solve all the tasks.
Examples
Note
In the first test, he will complete the task with topic in minutes, and the task with topic in minutes, spending a total of minutes.
In the second test, when solving the task with topic for the first time, he will spend minutes, when solving it again, he will spend minutes, and when solving the task with topic for the third time, he will spend minute, so in total he will spend minutes.
Scoring
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.
( points): ;
( points): ;
( points): ;
( points): ;
( points): without additional constraints.