# 思路

$f(n)=\sum_{j=0}n2j\ast j!\sum_{i=0}nS_ij$

$S_ij=\frac1{j!}\sum_{k=0}j(-1)kC_jk(j-k)i=\sum_{k=0}j\frac{(-1)k(j-k)i}{k!(j-k)!}$

$f(n)=\sum_{j=0}n2j\ast j!\sum_{i=0}n\sum_{k=0}j\frac{(-1)k(j-k)i}{k!(j-k)!}$

$f(n)=\sum_{j=0}n2j\ast j!\sum_{k=0}j\frac{(-1)k}{k!}\sum_{i=0}n\frac{(j-k)i}{(j-k)!}$

$f(n)=\sum_{j=0}n2j\ast j!\sum_{k=0}j\frac{(-1)k}{k!}\ast\frac{\sum_{i=0}n(j-k)i}{(j-k)!}$

$a(i)=\frac{(-1)^i}{i!}$

$b(i)=\frac{\sum_{j=0}nij}{i!}=\frac{i^{n+1}-1}{(i-1)i!}$

$f(n)=\sum_{j=0}^n 2^j\ast j!\ast(a\ast b)(j)$

### 注意事项

$b(0)=1,b(1)=n+1$

# Code

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int re=0,flag=1;char ch=getchar();
while(ch>'9'||ch<'0'){
if(ch=='-') flag=-1;
ch=getchar();
}
while(ch>='0'&&ch<='9') re=(re<<1)+(re<<3)+ch-'0',ch=getchar();
return re*flag;
}
#define ll long long
ll MOD=998244353,g=3,inv[400010],f[400010],finv[400010];
int qpow(ll a,ll b){//快速幂
ll re=1;
while(b){
if(b&1) re=re*a%MOD;
a=a*a%MOD;b>>=1;
}
return re;
}
ll n,A[400010],B[400010],C[400010],r[400010],limit,cnt;
void ntt(ll *a,ll type){
int i,j,k,mid;ll y,w,wn;
for(i=0;i<limit;i++) if(i<r[i]) swap(a[i],a[r[i]]);
for(mid=1;mid<limit;mid<<=1){
wn=qpow((type==1)?g:inv[g],(MOD-1)/(mid<<1));
for(j=0;j<limit;j+=(mid<<1)){
w=1;
for(k=0;k<mid;k++,w=w*wn%MOD){
y=a[j+k+mid]*w%MOD;
a[j+k+mid]=(a[j+k]-y+MOD)%MOD;
a[j+k]=(a[j+k]+y)%MOD;
}
}
}
if(type==-1) for(i=0;i<limit;i++) a[i]=a[i]*inv[limit]%MOD;
}
void init(){
limit=1;cnt=0;int i;
while(limit<=(n<<1)) limit<<=1,cnt++;
for(i=0;i<limit;i++) r[i]=((r[i>>1]>>1)|((i&1)<<(cnt-1)));
inv[1]=A[0]=B[0]=f[1]=finv[1]=1;A[1]=MOD-1;B[1]=n+1;
for(i=2;i<=limit;i++) inv[i]=(MOD-MOD/i)*inv[MOD%i]%MOD;
for(i=2;i<=limit;i++){
f[i]=f[i-1]*i%MOD;
finv[i]=finv[i-1]*inv[i]%MOD;
}
}
int main(){