from collections import defaultdict import sys readline=sys.stdin.readline N,X=map(int,readline().split()) S=list(map(int,readline().split())) ans=sum(S)-(N-1)*X print(ans)