x = list(map(int,input().split()))
l = list(map(int,input().split()))

ans = sum(l) - x[1]*(x[0]-1)

print(ans)