#include <bits/stdc++.h>
using namespace std;
int c[1001];
unsigned long long comb[3000][3000];
void init() {
  int i, j;
  for (i = 0; i < 3000; i++) comb[i][0] = 1;
  for (i = 1; i < 3000; i++) {
    for (j = 1; j <= i; j++) {
      comb[i][j] = comb[i - 1][j] + comb[i - 1][j - 1];
      comb[i][j] %= 1000000007;
    }
  }
}
int main() {
  memset(comb, 0, sizeof(comb));
  init();
  int n;
  cin >> n;
  unsigned long long dp[n + 1], s[n + 1];
  memset(c, 0, sizeof(c));
  s[0] = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> c[i];
    s[i] = s[i - 1] + c[i];
  }
  dp[1] = 1;
  for (int i = 2; i <= n; ++i) {
    dp[i] = dp[i - 1] * comb[s[i] - 1][c[i] - 1];
    dp[i] %= 1000000007;
  }
  cout << dp[n] << endl;
  return 0;
}
