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