object Main{
  def main(args: Array[String]){
   
      val input=io.Source.stdin.getLines().mkString("\n")
      println(solve(input).toString.trim());
    
  }


  def solve(input:String):Int ={
    val nums = input.split(" ").map(_ .toInt)
    val ret = if(nums(1) < nums(0)){
    	nums(0) * 2 - 1
    } else if (nums(1) > nums(0)){
    nums(1) * 2 -1
    }else {
    nums(1) * 2
    }
    ret
  }
}