#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long mulmod(long long a, long long b) { return (a * b) % mod; }
long long binpow(long long a, long long n) {
  if (n == 0) return 1;
  long long res = binpow(a, n / 2);
  res = mulmod(res, res);
  if (n % 2 == 1) return res = mulmod(res, a);
  return res;
}
long long inverse(long long a) { return binpow(a, mod - 2); }
const int MAXN = 1001;
long long fact[MAXN];
long long nfact[MAXN];
void fact_precalc(int n) {
  fact[0] = nfact[0] = 1;
  for (int i = 1; i <= n; i++) {
    fact[i] = (fact[i - 1] * i) % mod;
    nfact[i] = inverse(fact[i]);
  }
}
long long comb(int a, int b) {
  return mulmod(fact[b], mulmod(nfact[a], nfact[b - a]));
}
int cnt[MAXN];
int sum[MAXN];
void solve() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> cnt[i];
    sum[i] = sum[i - 1] + cnt[i];
  }
  fact_precalc(sum[n]);
  long long num = 1;
  for (int i = n; i >= 1; i--) {
    num = mulmod(num, comb(cnt[i] - 1, sum[i] - 1));
  }
  cout << num;
}
int main() {
  if (0) freopen("input.txt", "rt", stdin);
  if (0) freopen("output.txt", "wt", stdout);
  solve();
}
