#yuki1389 n,x=map(int,input().split()) s=list(map(int,input().split())) print(sum(s)-x*(n-1))