#include using namespace std; #include using namespace atcoder; using ll = long long; #define reps(i, a, n) for(ll i = (a); i < (ll)(n); ++i) #define rep(i,n) reps(i,0,n) #define all(a) (a).begin(), (a).end(); #define debug(x) cerr << "\033[33m(line:" << __LINE__ << ") " << #x << ": " << x << "\033[m" << endl; //なんかstd::vectorの挙動を修正できるやつ /* alias */ using ull = unsigned long long; using ll = long long; using vi = vector; using vl = vector; using vll = vector; using vvi = vector; using vvl = vector; using vvll = vector; using vs = vector; using pii = pair; using mint = modint998244353; ll mod = 998244353; int main(){ int n, a, b; cin >> n >> a >> b; vll p(n+1,1); p[0] = 1; reps(i,1,n+1){ p[i] = p[i-1] * i; p[i]%=mod; debug(p[i]); } ll ans; if(a == b){ ans = (p[n] - 2*p[n-1]+mod)%mod; }else{ ans = (p[n] - 2*p[n-1] + p[n-2]+mod)%mod; } cout << ans << endl; return 0; }