#include #if __has_include() #include using namespace atcoder; #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using mint = modint998244353; struct modfact { int n; vector d; modfact(): n(2), d({1,1}) {} mint operator()(int i) { while (n <= i) d.push_back(d.back()*n), ++n; return d[i]; } mint operator[](int i) const { return d[i];} } facts; int main() { int n, a, b; cin >> n >> a >> b; mint ans = facts(n); ans -= facts(n-1)*2; if (a != b) ans += facts(n-2); cout << ans.val() << '\n'; return 0; }