#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } #include using mint = atcoder::modint998244353; int main() { fast_io(); int n, a, b; cin >> n >> a >> b; vector facts(n + 1); facts[0] = 1; for (int i = 1; i <= n; i++) { facts[i] = facts[i - 1] * i; } mint ans = facts[n] - 2 * facts[n - 1]; if (a != b) { ans += facts[n - 2]; } cout << ans.val() << endl; }