#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 7;
long long int mod = 1e9 + 7;
long long int comb[N][N], col[N];
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int k;
  cin >> k;
  comb[0][0] = 1;
  for (int i = 0; i < k; ++i) {
    cin >> col[i];
  }
  for (int i = 1; i < N; ++i) {
    comb[i][0] = 1;
  }
  for (int i = 1; i < N; ++i) {
    for (int j = 1; j < N; ++j) {
      comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
      comb[i][j] %= mod;
    }
  }
  long long int res = 1;
  long long int tot = 0;
  for (int i = 0; i < k; ++i) {
    res *= comb[tot + col[i] - 1][col[i] - 1];
    res %= mod;
    tot += col[i];
  }
  cout << res;
  return 0;
}
