program T1 implicit none integer::k,n,f,a(100) read(*,*)k,n,f read(*,*)a(1:f) if(sum(a(1:f))>k*n)then write(*,*)-1 else write(*,*)(k*n)-sum(a(1:f)) end if end program T1