#include <bits/stdc++.h>
using namespace std;
const int N = 1505,P = 998244353;
using ll = long long;
int n,m,a[N];
ll qpow(ll a,ll b)
{
    ll ret = 1;
    while (b)
    {
        if (b & 1) ret = ret * a % P;
        a = a * a % P;b >>= 1;
    }
    return ret;
}
int main ()
{
    ios::sync_with_stdio(false);
    cin >> m;for (int i = 1;i <= m;i++) cin >> a[i],n += a[i];
    sort(a + 1,a + m + 1);ll ans = 0;
    ll sp = 0,sq = 1,tp = 1,tq = 1;
    for (int i = 0,j = 1;i < n;i++)
    {
        tp = tp * ((n * 2) - i) % P;tq = tq * (n - i) % P;
        sp = (sp * tq + sq * tp) % P;sq = sq * tq % P;
        while (j <= m && a[j] == i + 1) ans += sp * qpow(sq,P - 2) % P,j++;
    }
    cout << (sp * qpow(sq,P - 2) - ans + P) % P << endl;
    return 0;
}