#include <bits/stdc++.h>
using namespace std;
const int Maxn = 1010, mod = 1e9 + 7;
int k, c[Maxn], s[Maxn];
long long fac[Maxn][Maxn];
void init() {
  int i, j;
  fac[0][0] = 1;
  for (i = 1; i <= 1000; i++) {
    fac[i][0] = 1;
    for (j = 1; j <= 1000; j++)
      fac[i][j] = (fac[i - 1][j - 1] + fac[i - 1][j]) % mod;
  }
}
int main(int argc, const char* argv[]) {
  ios::sync_with_stdio(0);
  int i;
  cin >> k;
  for (i = 1; i <= k; i++) cin >> c[i], s[i] = s[i - 1] + c[i];
  init();
  long long ans = 1;
  for (i = 1; i <= k; i++) ans = 1LL * ans * fac[s[i] - 1][c[i] - 1] % mod;
  cout << ans << endl;
  return 0;
}
