d = list(map(int,input().split())) r = sum(list(map(int,input().split()))) t = d[0]*d[1] if t-r>= 0: print(t-r) else: print(-1)