n = gets a = gets.split(" ").map(&:to_i) v = gets.to_i p a.inject(:+) - v