k = [int(i) for i in input().split()] a = [int(i) for i in input().split()] res = k[0]*k[1] - sum(a) if res >= 0: print(res) else: print('-1')