Noora is a student of one famous high school. It's her final year in school — she is going to study in university next year. However, she has to get an «A» graduation certificate in order to apply to a prestigious one.

In school, where Noora is studying, teachers are putting down marks to the online class register, which are integers from 1 to k. The worst mark is 1, the best is k. Mark that is going to the certificate, is calculated as an average of all the marks, rounded to the closest integer. If several answers are possible, rounding up is produced. For example, 7.3 is rounded to 7, but 7.5 and 7.8784 — to 8. 

For instance, if Noora has marks [8, 9], then the mark to the certificate is 9, because the average is equal to 8.5 and rounded to 9, but if the marks are [8, 8, 9], Noora will have graduation certificate with 8.

To graduate with «A» certificate, Noora has to have mark k.

Noora got n marks in register this year. However, she is afraid that her marks are not enough to get final mark k. Noora decided to ask for help in the internet, where hacker Leha immediately responded to her request. He is ready to hack class register for Noora and to add Noora any number of additional marks from 1 to k. At the same time, Leha want his hack be unseen to everyone, so he decided to add as less as possible additional marks. Please help Leha to calculate the minimal number of marks he has to add, so that final Noora's mark will become equal to k.


-----Input-----

The first line contains two integers n and k (1 ≤ n ≤ 100, 1 ≤ k ≤ 100) denoting the number of marks, received by Noora and the value of highest possible mark.

The second line contains n integers a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ k) denoting marks received by Noora before Leha's hack.


-----Output-----

Print a single integer — minimal number of additional marks, that Leha has to add in order to change Noora's final mark to k.


-----Examples-----
Input
2 10
8 9

Output
4
Input
3 5
4 4 4

Output
3


-----Note-----

Consider the first example testcase.

Maximal mark is 10, Noora received two marks — 8 and 9, so current final mark is 9. To fix it, Leha can add marks [10, 10, 10, 10] (4 marks in total) to the registry, achieving Noora having average mark equal to $\frac{8 + 9 + 10 + 10 + 10 + 10}{6} = \frac{57}{6} = 9.5$. Consequently, new final mark is 10. Less number of marks won't fix the situation.

In the second example Leha can add [5, 5, 5] to the registry, so that making average mark equal to 4.5, which is enough to have 5 in the certificate.

Difficulty: interview

Starter code:

Solutions:
n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
s = sum(a)
ans = 0
c = k - 0.5
while s / n < c:
    s += k
    n += 1
    ans += 1
print(ans)


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

s = sum(l)
total = len(l)
res = 0
while s < total*k - total/2:
    s += k
    total += 1
    res += 1

print(res)


n, k = map(int, input().split())
a = list(map(int, input().split()))
i = 0
s = sum(a)
while (s + i * k) / (n + i) < k - 0.5:
    i += 1
print(i)

def check(m):
    return (s + k * m) * 2 >= (2 * k - 1) * (n + m)


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

s = sum(a)
l = -1
r = 10 ** 6
while l < r - 1:
    m = (l + r) // 2
    if check(m):
        r = m
    else:
        l = m
        
print(r)

from sys import stdin, stdout
import math

n, k = map(int, stdin.readline().split())
values = list(map(int, stdin.readline().split()))
ans = sum(values)
cnt = 0

def round(v):
    if math.ceil(v) - v <= 1 / 2:
        return math.ceil(v)
    else:
        return math.floor(v)
    

while round(ans / n) < k:
    ans += k
    n += 1
    cnt += 1


stdout.write(str(cnt))

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
print(max(0, 2 * n * k - n - 2 * sum(a)))


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

import math


def main():
    n, k = [int(x) for x in input().split()]
    a = [int(x) for x in input().split()]
    if sum(a) / n >= k - .5:
        print(0)
        return

    m = math.ceil(((k - .5) * n * 2 - 2 * sum(a)) / (2 * k - 2 * (k - .5)))
    print(int(m))

def __starting_point():
    main()

__starting_point()

import sys
n, k = map(int,sys.stdin.readline().rstrip().split())
l = list(map(int, sys.stdin.readline().rstrip().split()))

i = 0
while (sum(l)+k*i)/(i+n) < k-0.5:
    i += 1

sys.stdout.write(str(i))

import sys

def solve():
    n, k = map(int, input().split())
    a = [int(i) for i in input().split()]

    tot = sum(a)
    cnt = 0

    while int(tot / n + 0.5) < k:
        tot += k
        n += 1
        cnt += 1

    print(cnt)

def __starting_point():
    solve()
__starting_point()

n,k = list(map(int,input().split()))
a = list(map(int,input().split()))
s = sum(a)
p = (k-0.5)*n
if s >= p:
  print(0)
else:
  r = int(2*(p-s))
  print(r)


n,k = map(int, input().split())
a = list(map(int, input().split()))
sm = sum(a)
l,r = -1, 10 ** 20
def check(m):
    return round((sm + k * m) / (n + m) + 0.000001) >= k
while r - l > 1:
    m = (l + r) // 2
    if check(m):
        r = m
    else:
        l = m
print(r)

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

ans = 0
while 2 * (sum(a) + ans * k) < (n + ans) * (2 * k - 1):
    ans += 1
print(ans)


n,k=list(map(int,input().split()))
a=list(map(int,input().split()))
c=0
for i in range(n):
    z=k-a[i]
    c+=2*z-1
if c<0:
    print(0)
else:
    print(c)
    
    


n, k = map(int, input().split())
marks = list(map(int, input().split()))
summa = sum(marks)
nums = len(marks)
result = summa / nums
howmany = 0
while result < k - 0.5:
    summa += k
    nums += 1
    result = summa / nums
    howmany += 1
print(howmany)

import math
n, k = map(int, input().split())
sm = sum(list(map(int, input().split())))

a = 0
while int((sm + a*k) / (n + a) + 0.5) < k:
    a += 1
print(a)

n,k=[int(i)for i in input().split()]
l=[int(i)for i in input().split()]
ans=0
if sum(l)/n<k-0.5:
	ans = int(((k-0.5)*n-sum(l))/0.5)

print(ans)	



n, k=map (int, input (). split ()) 
grades=list(map (int, input (). split ())) 
ans=(2*k-1)*n-2*sum(grades)
if ans<0:
    ans=0
print (ans) 

x,y=list(map(int,input().split()))
a=list(map(int,input().split()))
n=0
d=0
for i in range(x):
	n=n+a[i]
while round((n+0.01)/x)!=y:
	n=n+y
	x=x+1
	d+=1
print(d)


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

s = sum(map(int, input().split()))
left = -1
right = 10 ** 100

while right - left > 1:
    mid = (left + right) // 2
    whole = s + k * mid
    if whole * 2 // (mid + n) < 2 * k - 1:
        left = mid
    else:
        right = mid

print(right)


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

i = 0
while(tot*2 < (k*2-1)*(n+i)):
    i+=1
    tot += k

print(i)


import math
import re

def f(n):
    if n - math.floor(n) < 0.5:
        return n
    else :
        return math.ceil(n)

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

n1 = n
s = sum(a)
sred = s/n
while f(sred) != k:
    s += k
    n += 1
    sred = s/n

print(n - n1)

# n, m = map(int, input().split())
# w = []
# c = []
# for i in range(n):
#     x, y = map(int, input().split())
#     w.append(x)
#     c.append(y)
#
# A = [[0] * (m + 1) for i in range(n)]
#
#
# for k in range(n):
#       for s in range(1, m + 1):
#             if s >= w[k]:
#                 A[k][s] = max(A[k - 1][s], A[k - 1][s - w[k]] + c[k])
#             else:
#                 A[k][s] = A[k-1][s]
#
# print(A[n - 1][m])

    # arr = list(map(int, input().split()))
# res = 0
# a = {math.pow(2, i) for i in range(35)}
# for i in range(n-1):
#     for j in range(i+1,n):
#         if arr[i] + arr[j] % 2 % 2 % 2 % 2 % 2 in a:
#             res += 1
#
# print(res)


# arr = list(map(int, input().split()))
# m = int(input())
# spis = list(map(int, input().split()))
#
# arr1 = sorted(arr, reverse=True)
# a = [n - arr1.index(arr[el - 1]) for el in spis]
# print(' '.join(map(str, a)))


n,k=list(map(int,input().split()))
l = list(map(int,input().split()))
s = sum(l)
req = k-0.5
if(s>=n*req):
	print(0)
	return
for i in range(1,100000):
	if((s+(k*i))>=(n+i)*req):
		print(i)
		return


n, k = map(int, input().split())
a = list(map(int, input().split()))
l = len(a)
s = sum(a)
cur = round(s / l + 0.0000001)
count = 0
while cur != k:
    s += k
    l += 1
    cur = round(s / l + 0.0000001)
    count += 1
print(count)

n, k = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]

s = sum(a)
i = 0
l = len(a)
while round(s / l + 0.00001) != k:
    # print(s)
    i += 1
    s += k
    l += 1
print(i)

3.5
n,k=[int(x) for x in input().split()]
mas=[int(x) for x in input().split()]

p=0
s=sum(mas)
while True:
    if s/n>=k-0.5:
        print(p)
        quit()
    else:
        s+=k
        n+=1
        p+=1