#include <bits/stdc++.h>
using namespace std;
constexpr int64_t MOD = 1000000007;
int64_t nkcache[1000][1000];
void fillnkarr() {
  for (int n = 0; n < 1000; n++) nkcache[n][0] = 1;
  for (int n = 1; n < 1000; n++)
    for (int k = 1; k < 1000; k++)
      nkcache[n][k] = (nkcache[n - 1][k] + nkcache[n - 1][k - 1]) % MOD;
}
int main() {
  fillnkarr();
  int64_t k;
  cin >> k;
  int64_t n = 0;
  int64_t res = 1;
  for (int64_t i = 0; i < k; i++) {
    int64_t c;
    cin >> c;
    int64_t nn = c - 1 + n + 1 - 1;
    int64_t kk = c - 1;
    int64_t old_res = res;
    res = (res * nkcache[nn][kk]) % MOD;
    n += c;
  }
  cout << res << "\n";
}
