N, X = map(int, input().split()) array_A = list(map(int, input().split())) total = 0 for i in range(N): total += array_A[i] print(total-X)