MOD = 998244353 n, a, b = map(int, input().split()) if a == b: ans = n - 2 for i in range(1, n): ans *= i ans %= MOD print(ans) else: prod = 1 for i in range(1, n - 1): prod *= i prod %= MOD ans = prod + 2 * (n - 2) * prod + (n - 2) * (n - 3) * prod print(ans % MOD)