mg = gets.split(" ").map{|i| i.to_i} puts mg[0]==mg[1] ? mg[0]+mg[1] : mg[0]+mg[1]+(mg[0]-mg[1]).abs-1