#include <bits/stdc++.h>
using namespace std;
const int maxn = 4096;
const long long mod = 1000000007LL;
long long C[maxn][maxn];
long long r[maxn], f[maxn], c[maxn];
int build() {
  memset(C, 0, sizeof(C));
  for (int i = 0; i < maxn; i++) C[i][0] = 1;
  for (int i = 1; i < maxn; i++)
    for (int j = 1; j < maxn; j++) {
      C[i][j] = C[i - 1][j] + C[i - 1][j - 1];
      C[i][j] %= mod;
    }
  return 0;
}
long long foo(long long n, long long r) { return C[n + r - 1][r - 1]; }
int main() {
  std::ios::sync_with_stdio(false);
  build();
  int k;
  cin >> k;
  for (int i = 1; i <= k; i++) {
    cin >> c[i];
  }
  r[0] = 0;
  for (int i = 1; i <= k; i++) {
    r[i] = r[i - 1] + c[i];
  }
  f[1] = 1;
  for (int i = 2; i <= k; i++) {
    f[i] = f[i - 1] * foo(c[i] - 1, r[i - 1] + 1);
    f[i] %= mod;
  }
  cout << f[k] << endl;
}
