n,x=map(int,input().split()) print(sum(map(int,input().split()))-x*n+x)