L = list(map(int, input().split())) M = sum(map(int, input().split())) sum = L[0] * L[1] - M if sum < 0: sum = -1 print(sum)