# 包除原理だな mod = 998244353 N, A, B = map(int, input().split()) if A != B: total = 1 for i in range(1, N+1): total *= i total %= mod deduct1 = 1 for i in range(1, N): deduct1 *= i deduct1 %= mod add1 = 1 for i in range(1, N-1): add1 *= i add1 %= mod ans = (total - deduct1*2 + add1)%mod #print(total, deduct1, add1) print(ans) elif A == B: total = 1 for i in range(1, N+1): total *= i total %= mod deduct1 = 1 for i in range(1, N): deduct1 *= i deduct1 %= mod add1 = 0 ans = (total - deduct1*2 + add1)%mod #print(total, deduct1, add1) print(ans)