N = gets.to_i a = gets.split if a.size != 1 puts "assert" exit end a = a[0].to_i b, c = 2.times.map { gets.to_i } puts [a + b, b + c, c + a].sort.uniq[-2]