fun main() { val (a, b) = readLine()!!.split(" ").map { it.toInt() }.sorted() println(if(b==1) 1 else if(a==b) a*2-1 else a*2) }