line = $stdin.gets.split(" ").map{|v| v.to_i}

result = 0

if (line[0] <=> line[1]) == 1 then
  result += line[0]
  line[0] -= 1
elsif (line[0] <=> line[1]) == 0 then
  result += line[0]
  line[0] -= 1
else
  result += line[1]
  line[1] -= 1
end

if (line[0] <=> line[1]) == 1 then
  result += line[0]
  line[0] -= 1
elsif (line[0] <=> line[1]) == 0 then
  result += line[0]
  line[0] -= 1
else
  result += line[1]
  line[1] -= 1
end
  
puts result