fun main() { val (a, b) = readLongs() fun fac(n: Long) = (1..n).map { ModInt(it) }.fold(ModInt(1), ModInt::times) println(fac(a + b - 2) / (fac(a - 1) * fac(b - 1))) } // region ModInt class ModInt(x: Long) { companion object { const val MOD = 998244353L } val x = (x % MOD + MOD) % MOD operator fun plus(other: ModInt): ModInt { return ModInt(x + other.x) } operator fun minus(other: ModInt): ModInt { return ModInt(x - other.x) } operator fun times(other: ModInt): ModInt { return ModInt(x * other.x) } operator fun div(other: ModInt): ModInt { return this * other.inv() } fun pow(exp: Long): ModInt { if (exp == 0L) return ModInt(1L) var a = pow(exp shr 1) a *= a if (exp and 1L == 0L) return a return this * a } fun inv(): ModInt { return this.pow(MOD - 2) } override fun toString(): String { return "$x" } } // endregion fun readLongs() = readln().split(" ").map { it.toLong() }