#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1010;
const long long MOD = 1000000007;
int cnt[MAXN];
long long fac[MAXN], ans = 1;
long long POW(long long exp, long long power) {
  if (power == 0) return 1;
  long long ansP = POW(exp, power / 2);
  ansP = ansP * ansP % MOD;
  if (power % 2 == 1) ansP = ansP * exp % MOD;
  return ansP;
}
long long C(long long n, long long r) {
  long long ansC = (fac[n] * (POW(fac[r] * fac[n - r] % MOD, MOD - 2))) % MOD;
  return ansC;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  fac[0] = 1;
  fac[1] = 1;
  for (int i = 2; i < MAXN; i++) {
    fac[i] = i * fac[i - 1] % MOD;
  }
  int k;
  cin >> k;
  for (int i = 0; i < k; i++) {
    cin >> cnt[i];
  }
  int length = cnt[0];
  for (int i = 1; i < k; i++) {
    ans *= C(cnt[i] + length - 1, length);
    ans %= MOD;
    length += cnt[i];
  }
  cout << ans << endl;
}
