a = gets b = gets.split(" ").map(&:to_i).inject(:+) c = gets.to_i puts b - c