A=list(map(int,input().split())) B=list(map(int,input().split())) S=A[0]*A[1] s=sum(B) if S-s>=0: print(S-s) if S-s<0: print("-1")