MOD = 998244353 n, a, b = map(int, input().split()) if n == 2: if a == b: print("0") else: print("1") exit() fact = [1 for _ in range(n + 1)] for x in range(2, n + 1): fact[x] = (fact[x - 1] * x) % MOD if a == b: print((n - 2) * fact[n - 1] % MOD) else: print((fact[n] - 2 * fact[n - 1] + fact[n - 2]) % MOD)