The king's birthday dinner was attended by $k$ 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 $1$ to $100$. 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 $n$ and $k$ ($1 \le n \le 100, 1 \le k \le 100$)  — the number of kitchen utensils remaining after the dinner and the number of guests correspondingly.

The next line contains $n$ integers $a_1, a_2, \ldots, a_n$ ($1 \le a_i \le 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
5 2
1 2 2 1 3

Output
1

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

Output
14



-----Note-----

In the first example it is clear that at least one utensil of type $3$ 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)$ of utensils. Therefore, the answer is $1$.

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

Difficulty: interview

Starter code:

Solutions:
rest, people = map(int, input().split())
types = list(map(int, input().split()))
a = dict()
for elem in types:
    if elem in a:
        a[elem] += 1
    else:
        a[elem] = 1
maximum = 0
for key in a:
    if a[key] > maximum:
        maximum = a[key]
needed = maximum
while needed % people != 0:
    needed += 1
ans = 0
for key in a:
    ans += needed - a[key]
print(ans)

n, k = map(int, input().split())
a = list(map(int, input().split()))
c = [0] * 101
for i in a:
    c[i] += 1
m = (max(c) + k - 1) // k
ans = 0
for i in range(101):
    if (c[i]):
        ans += max(0, m * k - c[i])
print(ans)

import math
n, k=map(int, input().split())
_=list(map(int, input().split()))
a=[0 for i in range(101)]
for i in _:
  a[i]+=1
k1=math.ceil(max(a)/k)*k
s1=0
for i in a:
  if (i>0):
    s1+=(k1-i)
print (s1)

n,k=list(map(int,input().split()))
a=list(map(int,input().split()))
import collections
b=collections.Counter(a)
#print(b)
c=b.most_common(1)[0][1]
gg=max((c+k-1)//k,1)
need=k*gg*len(b)
#print(c)

for i in b:
    need-=b[i]
    


print(need)


#!/usr/bin/env python3
# -*- coding: utf-8 -*-

#n = int(input())
from math import ceil

n, k = list(map(int, input().split()))
arr = list(map(int, list(input().split())))

d = {}
max_cnt = 0


for i in range(len(arr)):
    x = arr[i]
    if not x in d:
        d[x] = 0
    d[x] += 1
    max_cnt = max(max_cnt, d[x])

min_blud = ceil(max_cnt / k)
print(min_blud * len(d) * k - n)


n, k = list(map(int,input().split()))

b = list(map(int,input().split()))
d = [0 for i in range(100)]
for i in b:
    d[i-1] += 1
if max(d) % k == 0:
    m = max(d)
else:
    m = max(d) + (k - max(d)%k)
s = 0
for i in d:
    if i != 0:
        s += m - i
print(s)


n, k = map(int, input().split())
a = list(map(int, input().split()))
b = [0 for i in range(101)]
for i in a:
    b[i] += 1
x = max(b)
if x % k != 0:
    x //= k
    x += 1
    x *= k
ans = 0
for i in range(101):
    if b[i] != 0:
        ans += x - b[i]
print(ans)

n, k = map(int, input().split())
lst = list(map(int, input().split()))
a = [0] * 101
cnt = 0
for i in lst:
    a[i] += 1
    if a[i] == 1:
        cnt += 1

x = max(a)
if x % k == 0:
    p = x // k
else:
    p = x // k + 1
print(cnt * p * k - n)

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
mx = 0
p = set(a)
for i in p:
    b = a.count(i)
    if b > mx:
        mx = b
blud = -(-mx // k)
print(blud * k * len(p) - len(a))

n, k = list(map(int, input().split()))
prib = list(map(int, input().split()))
prib.sort()
I = 0
p = []
while I < n:
    a = prib[I]
    p.append(0)
    while I < n and a == prib[I]:
        I += 1
        p[-1] += 1
p.sort()
l = (p[-1] - 1) // k + 1
l *= k
ans = 0
for i in p:
    ans += l - i
print(ans)


n,k=list(map(int,input().split()))
a=list(map(int,input().split()))
d={}
for x in a:
    d[x]=d.get(x,0)+1
m=max(d.values())
if m%k==0:
    sets=m//k
else:
    sets=m//k+1
print(sets*len(d)*k-n)


pr = list([0 for x in range(101)])
n, k = list(map(int, input().split()))
inp = list(map(int, input().split()))
for i in inp:
    pr[i] += 1
pr.sort(reverse=True)
m = pr[0] // k + bool(pr[0] % k)
m *= k
ans = 0
i = 0
while i <= 100 and pr[i] > 0:
    ans = ans + m - pr[i]
    i += 1
print(ans)


from collections import Counter

n, k = list(map(int, input().split()))
a = tuple(Counter(input().split()).values())
print(len(a) * ((max(a) - 1) // k + 1) * k - sum(a))


n, c = list(map(int, input().split()))
a = list(map(int, input().split()))
s = set(a)
k = []
for i in s:
    k.append(a.count(i))
if max(k) % c == 0:
    d = max(k) // c
    d *= c
else:
    d = max(k) // c + 1
    d *= c
result = 0
for i in k:
    result += d - i
print(result)

    


n, m = map(int, input().split())
c=[0]*200
a= list(map(int, input().split()))
for i in range(n):
    c[a[i]]+=1
summ=0
x=max(c)-max(c)%m
if max(c)%m!=0:
    x+=m
for i in range(len(c)):
    if c[i]!=0:
        summ+=(x-c[i])
print(summ)

n, k = list(map(int, input().split()))
dList = list(map(int, input().split()))
maxD = 0
d = {}
for i in dList:
    if i in d:
        d[i] += 1
    else:
        d[i] = 1
    if d[i] > maxD:
        maxD = d[i]
amount = 0
dis = ((maxD - 1) // k + 1) * k
for i in list(d.values()):
    amount += dis - i
print(amount)


from collections import Counter
from math import ceil
n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
d = Counter()
for i in a:
    d[i] += 1
m = ceil(max(d.values()) / k) * len(d) * k
s = sum(d.values())
print(m - s)
#print(d)
#print(m)


import math
from collections import defaultdict

n, k = map(int, input().split())
a = [int(i) for i in input().split()]
b = defaultdict(int)
for el in a:
    b[el] += 1
x = max(b.values())
v = math.ceil(x / k)
r = 0
for el in b.values():
    r += v * k - el
print(r)

n, k = map(int, input().split())
a = [int(x) - 1 for x in input().split()]
s = [0] * 100
for i in range(n):
	s[a[i]] += 1
m = max(s)
if m % k != 0:
	m += k - m % k
print(sum([m - s[i] for i in range(100) if s[i] != 0]))

n, k = map(int, input().split())
sp = list(map(int, input().split()))
d = {}
l2 = []
m = 0
for elem in sp:
    if elem in d:
        d[elem] += 1
    else:
        d[elem] = 1
for e in d:
    if d[e] > m:
        m = d[e]
blud_podano = (m - 1) // k + 1
print(blud_podano*len(d)*k-n)

n,m=map(int,input().split())
listik=list(map(int,input().split()))
maximum=0
for i in listik:
    if listik.count(i)>maximum:
        maximum=listik.count(i)
if maximum%m==0:
    number=maximum//m
else:
    number=maximum//m+1
print(len(set(listik))*number*m-len(listik))

from math import ceil

n,k = map(int,input().split())
a = [int(i) for i in input().split()]
d = {}


for i in set(a):
	d[i] = a.count(i)

m = max(d.values())
dishes = ceil(m/k)
types = len(d)

#print(dishes, types)
print(types*dishes*k - n)

n, k = map(int, input().split())
M = list(map(int, input().split()))

T = [0] * 100
for i in range (n): T[M[i] - 1] += 1

t, b = 0, 0
for i in range (100):
    if T[i] != 0:
        t += 1
        b = max(b, (T[i] + k - 1) // k)

print (b * t * k - n)

n, m = map(int, input().split())
D = dict()
arr = list(map(int, input().split()))
for el in arr:
    if el in D.keys():
        D[el] += 1
    else:
        D[el] = 1
maxx = -1
for key in D.keys():
    if D[key] > maxx:
        maxx = D[key]
#print(maxx)
a = maxx // m
if maxx % m > 0:
    a += 1
summ = a * m
ans = 0
#print(summ)
for key in D.keys():
    ans += (summ - D[key])
print(ans)