class Yukicoder def initialize k, n, f = gets.chomp.split(' ').map(&:to_i) a = gets.chomp.split(' ').map(&:to_i) sum = a.inject(:+) if k * n >= sum puts k * n - sum else puts -1 end end end Yukicoder.new