#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; int mod = 998244353; mint kaijo(ll n){ if(n <= 1) return 1; return n*(n-1); } int main(){ int n, a, b; cin >> n >> a >> b; vll p(n+1); p[0] = 1; reps(i,1,n+1){ p[i] = p[i-1] * i; p[i]%=mod; debug(p[i]); } ll ans = 1; if(a != b){ ans = (n-1)*p[n-1] - (n-2)*p[n-2]; ans%=mod; }else{ ans = (n-1)*p[n-1] - (n-1)*p[n-2]; ans%=mod; } cout << ans << endl; return 0; }