k, n = gets.split.map &:to_i bean = k*n age = Array.new(gets.split.map &:to_i).sum puts bean>=age ? bean-age : -1