import java.util.Scanner

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val a = sc.nextInt()
    val b = sc.nextInt()
    val result = press(0, a, b)
    println(result)
}

private fun press(coin: Int, buttonSizeA: Int, buttonSizeB: Int, pressCount: Int = 0): Int {
    if (pressCount >= 2) {
        return coin
    }
    return when (buttonSizeA > buttonSizeB) {
        true -> press(coin + buttonSizeA, buttonSizeA - 1, buttonSizeB, pressCount + 1)
        false -> press(coin + buttonSizeB, buttonSizeA, buttonSizeB - 1, pressCount + 1)
    }
}
