n = list(map(int,input().split())) l = list(map(int,input().split())) total = n[0]*n[1] age = sum(l) if total>=age: print(total-age) else: print(-1)