#include <bits/stdc++.h>
using namespace std;
long long n, m, x, y, l, r;
double a, b, c, d, q;
vector<int> V;
vector<vector<int> > D;
string s, k, z;
long long res = 0;
double eps = 0.000000001;
const int INF = 1000000007;
const int MAXNUM = 1005;
long long arr[MAXNUM][MAXNUM] = {0};
int main() {
  arr[0][0] = 1;
  for (int i = 1; i < MAXNUM; i++) {
    arr[i][0] = 1;
    for (int j = 1; j <= i; j++) {
      arr[i][j] = (arr[i - 1][j] + arr[i - 1][j - 1]) % INF;
    }
  }
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> m;
    V.push_back(m);
  }
  m = 0;
  res = 1;
  for (int i = 0; i < n; i++) {
    res = (res * arr[m + V[i] - 1][V[i] - 1]) % INF;
    m += V[i];
  }
  cout << res % INF << endl;
  return 0;
}
