ary = list(map(int, input().split())) age = list(map(int, input().split())) num = ary[0] * ary[1] -sum(age) print(num if num >= 0 else -1)