// Counting Template #include using namespace std; #define mod 998244353 #define FACSIZE 1048576 long long power(long long a,long long b){ long long x=1,y=a; while(b>0){ if(b&1ll){ x=(x*y)%mod; } y=(y*y)%mod; b>>=1; } return x%mod; } long long modular_inverse(long long n){ return power(n,mod-2); } long long factorial[FACSIZE]; long long invfact[FACSIZE]; void cfact(){ long long i; factorial[0]=1; factorial[1]=1; for(i=2;i=0;i--){ invfact[i]=invfact[i+1]*(i+1); invfact[i]%=mod; } } long long calcnCr(long long n,long long k){ if(k<0 || n> n; long long p=0,q=0; for(long long i=0;i> a; p+=a; q++; } p=min(p,n-p); return (p*modular_inverse(q))%mod; } int main(){ cfact(); ios::sync_with_stdio(false); cin.tie(nullptr); int t=1; // cin >> t; while(t>0){ t--; cout << solve()%mod << "\n"; } return 0; } // #include // // using namespace std; // // vector f(vector &a){ // int n=a.size(); // vector res; // for(int i=0;i a={1,1,0}; // for(int tr=0;tr<10;tr++){ // for(auto &nx : a){cout << nx << " ";} // cout << "\n"; // a=f(a); // } // return 0; // }