#include using namespace std; using ll=long long; using pll=pair; using tll=tuple; using ld=long double; const ll INF=(1ll<<60); #define rep(i,n) for (ll i=0;i<(ll)(n);i++) #define all(v) v.begin(),v.end() template inline bool chmin(T &a,T b){ if(a>b){ a=b; return true; } return false; } template inline bool chmax(T &a,T b){ if(a using mint=atcoder::modint998244353; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); ll n; cin >> n; vector a(n); rep(i,n) cin >> a[i]; vector f(n+n,1); for(ll i=2;i r(n); rep(i,n) r[n-1-i]=f[n-1+i]/(f[n-1]*f[i])*(mint)(n-1-i+1)/(mint)(n); mint ans=0; rep(i,n) ans+=(mint)a[i]*r[i]; cout << ans.val() << '\n'; }