integer::k,n,f integer,allocatable::a(:) read *,k,n,f allocate(a(f)) read *,(a(i),i=1,f) print '(i0)', MAX(k*n-SUM(a),-1) end program