#include<bits/stdc++.h>
#define For(i,a,b) for(register int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(register int i=(a);i>=(b);--i)
#define int long long
using namespace std;
inline int read()
{
    char c=getchar();int x=0;bool f=0;
    for(;!isdigit(c);c=getchar())f^=!(c^45);
    for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
    if(f)x=-x;return x;
}

#define mod 998244353

#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;
#define maxn 200005
#define inf 0x3f3f3f3f

inline int qpow(int a,int b=mod-2){
	int res=1;
	while(b){
		if(b&1)res=1ll*res*a%mod;
		a=1ll*a*a%mod,b>>=1;
	}return res;
}

int n,m,a[2333]; 

signed main()
{
	m=read();
	For(i,1,m)a[i]=read(),n+=a[i];
	sort(a+1,a+m+1);
	int res=0;
	int p0=0,q0=1;
	int p1=mod-2,q1=1;
	int p=1;
	while(p<=m&&a[p]==1)res+=(mod-2),res%=mod,++p;
	For(i,1,n-1)
	{
		int p2=(1ll*(3*n-2*i)*p1%mod*q0 
			+ (mod-1ll)*(2*n-i)%mod*p0%mod*q1)%mod;
		int q2=1ll*(n-i)*q0%mod*q1%mod;
	//	p2%=mod,q2%=mod;
		
		while(p<=m&&a[p]==i+1)
			res=(res+1ll*p2*qpow(q2))%mod,++p;
		p0=p1,q0=q1;
		p1=p2,q1=q2;
	}
//	cout<<mod<<endl;
///	cout<<p1<<endl;
///	cout<<q1<<endl;
//	cout<<qpow(q1)<<endl;
//	cout<<res<<' '<<1ll*(mod-p1)*qpow(q1)<<endl;
	res=(res+1ll*(mod-p1)*qpow(q1))%mod;
	cout<<res%mod;
	return 0;
}
