def lscan; gets.split.map(&:to_i); end a, b = lscan mi = [a,b].min ma = [a,b].max p mi + [ma,mi+1].min - 1