n, m = [int(i) for i in input().split(' ')]



a_list = [int(i) for i in input().split(' ')]



result = n - sum(a_list)

if result < 0:

    print((-1))

else:

    print(result)

n, m = list(map(int, input().split()))



a_list = list(map(int, input().split()))



result = n - sum(a_list)

if result < 0:

    print((-1))

else:

    print(result)

n, m = [int(i) for i in input().split(" ")]
a_list = [int(i) for i in input().split(" ")]
result = n - sum(a_list)
if result < 0:
    print((-1))
else:
    print(result)

n, m = list(map(int, input().split()))
a_list = list(map(int, input().split()))
result = n - sum(a_list)
if result < 0:
    print((-1))
else:
    print(result)

-n, m = [int(i) for i in input().split(" ")] -a_list = [int(i) for i in input().split(" ")] +n, m = list(map(int, input().split())) +a_list = list(map(int, input().split()))