A. Kitchen Utensils

time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

The king's birthday dinner was attended by kk guests. The dinner was quite a success: every person has eaten several dishes (though the number of dishes was the same for every person) and every dish was served alongside with a new set of kitchen utensils.

All types of utensils in the kingdom are numbered from 11 to 100100. It is known that every set of utensils is the same and consist of different types of utensils, although every particular type may appear in the set at most once. For example, a valid set of utensils can be composed of one fork, one spoon and one knife.

After the dinner was over and the guests were dismissed, the king wondered what minimum possible number of utensils could be stolen. Unfortunately, the king has forgotten how many dishes have been served for every guest but he knows the list of all the utensils left after the dinner. Your task is to find the minimum possible number of stolen utensils.

Input

The first line contains two integer numbers nn and kk (1≤n≤100,1≤k≤1001≤n≤100,1≤k≤100)  — the number of kitchen utensils remaining after the dinner and the number of guests correspondingly.

The next line contains nn integers a1,a2,…,ana1,a2,…,an (1≤ai≤1001≤ai≤100)  — the types of the utensils remaining. Equal values stand for identical utensils while different values stand for different utensils.

Output

Output a single value — the minimum number of utensils that could be stolen by the guests.

Examples

input

Copy


5 2 1 2 2 1 3


output

Copy


1


input

Copy


10 3 1 3 3 1 3 5 5 5 5 100


output

Copy


14


Note

In the first example it is clear that at least one utensil of type 33 has been stolen, since there are two guests and only one such utensil. But it is also possible that every person received only one dish and there were only six utensils in total, when every person got a set (1,2,3)(1,2,3) of utensils. Therefore, the answer is 11.

One can show that in the second example at least 22 dishes should have been served for every guest, so the number of utensils should be at least 2424: every set contains 44 utensils and every one of the 33 guests gets two such sets. Therefore, at least 1414 objects have been stolen. Please note that utensils of some types (for example, of types 22 and 44 in this example) may be not present in the set served for dishes.


#include<cstdio>
#include<iostream>
#include<fstream>
#include<algorithm>
#include<functional>
#include<cstring>
#include<string>
#include<cstdlib>
#include<iomanip>
#include<numeric>
#include<cctype>
#include<cmath>
#include<ctime>
#include<queue>
#include<stack>
#include<list>
#include<set>
#include<map>
using namespace std;
#define N 100+5
#define MAX 26
typedef long long ll;
int a[N],n,m;
int vis[105];
int main()
{
scanf("%d%d",&n,&m);
int maxx=0;
for(int i=1;i<=n;i++)
{
scanf("%d",&a[i]);
vis[a[i]]++;
maxx=max(vis[a[i]],maxx);
}
double x=1.0*maxx/m;

int y;
if(x>int(x))
y=(int)x+1;
else
y=(int)x;
ll sum=0;
//cout<<y<<endl;
for(int i=0;i<=100;i++)
{
if(vis[i]>0)
{
//cout<<i<<" "<<vis[i]<<endl;
sum+=y*m-vis[i];
}
}
cout<<sum<<endl;
return 0;
}