// No.2130 分配方法の数え上げ mod 998244353 package main import ( "fmt" ) const MOD = 998_244_353 func main() { var N, M int fmt.Scan(&N, &M) a := modpow(2, N, MOD) b := 1 for i := 0; i < M; i++ { a = (a - b + MOD) % MOD b = (b * (N - i) % MOD) % MOD b = (b * modinv(i+1, MOD)) % MOD } fmt.Println(a) } func modinv(a, m int) int { b := m u := 1 v := 0 for b != 0 { t := a / b a -= t * b a, b = b, a u -= t * v u, v = v, u } u %= m if u < 0 { u += m } return u } func modpow(a int, n int, mod int) int { m := 1 for n > 0 { if n&1 == 1 { m = (m * a) % mod } a = (a * a) % mod n >>= 1 } return m }