#include int main () { int n = 0; int a = 0; int b = 0; int res = 0; long long ans = 0LL; long long fact = 1LL; long long mod_num = 998244353LL; res = scanf("%d", &n); res = scanf("%d", &a); res = scanf("%d", &b); for (int i = 0; i < n-2; i++) { fact *= (long long)(i+1); fact %= mod_num; } if (a != b) { ans += fact; } fact *= (long long)(n-1); fact %= mod_num; ans += (mod_num-fact)*2LL; ans += fact*((long long)n); printf("%lld\n", ans%mod_num); return 0; }