k, n, _ = gets.chomp.split.map &:to_i as = gets.chomp.split.map &:to_i remain = k * n - as.sum p (remain < 0) ? p - 1 : remain