import sys
input = sys.stdin.readline

N,X=map(int,input().split())
S=list(map(int,input().split()))

print(X-(N*X-sum(S)))