inputs = STDIN.readlines.map(&:chomp) k, n, f = inputs[0].split(/\s+/).map(&:to_i) as = inputs[1].split(/\s+/).map(&:to_i) rest = k * n - as.inject(:+) puts rest < 0 ? -1 : rest