#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  if (k == 0) {
    cout << 1;
  } else {
    vector<long long> c(k, 0);
    for (int i = 0; i < k; i++) cin >> c[i];
    long long tot = accumulate((c).begin(), (c).end(), 0);
    vector<vector<long long> > coeffs(tot, vector<long long>(tot, 0));
    for (int i = 0; i < tot; i++) coeffs[i][0] = 1, coeffs[i][i] = 1;
    for (int i = 1; i < tot; i++) {
      for (int j = 1; j < i; j++) {
        coeffs[i][j] = (coeffs[i - 1][j] + coeffs[i - 1][j - 1]) % 1000000007;
      }
    }
    vector<long long> d(k, 0);
    d[0] = c[0];
    for (int i = 1; i < k; i++) {
      d[i] = d[i - 1] + c[i];
    }
    int soln = 1;
    for (int i = 0; i < (c).size(); i++) {
      soln = (soln * coeffs[d[i] - 1][c[i] - 1]) % 1000000007;
    }
    cout << soln;
  }
}
