import numpy as np

N,M = list(map(int,input().split()))

A = np.array(list(map(int,input().split())))

if (output := N - np.sum(A)) >= 0:

    print(output)

else:

    print((-1))

N,M = list(map(int,input().split()))

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

output = N - sum(A)

if output >= 0:

    print(output)

else:

    print((-1))
import numpy as np

N, M = list(map(int, input().split()))
A = np.array(list(map(int, input().split())))
if (output := N - np.sum(A)) >= 0:
    print(output)
else:
    print((-1))

N, M = list(map(int, input().split()))
A = list(map(int, input().split()))
output = N - sum(A)
if output >= 0:
    print(output)
else:
    print((-1))

-import numpy as np - -A = np.array(list(map(int, input().split()))) -if (output := N - np.sum(A)) >= 0: +A = list(map(int, input().split())) +output = N - sum(A) +if output >= 0: