#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define pii pair<int,int>
#define mp make_pair
#define fir first
#define sec second
using namespace std;

inline ll read(){
	ll num=0,neg=1;char c=getchar();
	while(!isdigit(c)){if(c=='-')neg=-1;c=getchar();}
	while(isdigit(c)){num=(num<<3)+(num<<1)+c-'0';c=getchar();}
	return num*neg;
}

const ll mod=998244353;
ll a[1010],n,sum,fz=0,fm=1,d=1,s,t;

inline ll qpow(ll x,ll k){
	ll res=1;
	while(k){
		if(k&1) res=res*x%mod;
		x=x*x%mod;k>>=1;
	}return res;
}

int main(){
	n=read();
	for(int i=1;i<=n;i++) a[i]=read(),sum+=a[i];
	sort(a+1,a+n+1);a[n+1]=sum;
	for(int now=1,x;now<=n+1;now++)
	{
		for(int i=a[now-1];i<a[now];i++)
		{
			d=d*(2*sum-i)%mod;
			fz=fz*(sum-i)%mod;
			fm=fm*(sum-i)%mod;
			fz+=d;
		}
		if(now==n+1) t=mod-fz*qpow(fm,mod-2)%mod;
		else s+=mod-fz*qpow(fm,mod-2)%mod;
	}
	printf("%d\n",(s-t+mod)%mod);
	return 0;
}
