fun readString() = readLine()!!
fun readInt() = readLine()!!.toInt()
fun readLong() = readLine()!!.toLong()
fun readIntList() = readLine()!!.split(" ").map(String::toInt)
fun readLongList() = readLine()!!.split(" ").map(String::toLong)
fun <T> Array<Array<T>>.print() {
    this.forEach {
        println(it.joinToString(" "))
    }
}

class Combination(maxNum: Int, private val mod: Int) {
    private val fac = LongArray(maxNum + 1).apply { this[0] = 1L; this[1] = 1L }
    private val fInv = LongArray(maxNum + 1).apply { this[0] = 1L; this[1] = 1L }
    private val inv = LongArray(maxNum + 1).apply { this[1] = 1L }

    init {
        for (i in 2..maxNum) {
            fac[i] = fac[i - 1] * i % mod
            inv[i] = mod - inv[mod % i] * (mod / i) % mod
            fInv[i] = fInv[i - 1] * inv[i] % mod
        }
    }

    fun get(n: Int, k: Int): Long {
        if (n < k) return 0
        if (n < 0 || k < 0) return 0
        return fac[n] * (fInv[k] * fInv[n - k] % mod) % mod
    }
}

fun main() {
    val comb = Combination(101, Int.MAX_VALUE)
    val (n, m) = readIntList()
    println(comb.get(n, 2) + comb.get(m, 2))
}
