#include <bits/stdc++.h>
using namespace std;
int NCR[1005][1005];
int mod_mul(long long a, long long b) { return (a * b) % 1000000007; }
int mod_plus(int a, int b) { return (a + b) % 1000000007; }
int nCr(int n, int r) {
  if (n == r || r == 0) return 1;
  int &ret = NCR[n][r];
  if (ret != -1) return ret;
  return ret = mod_plus(nCr(n - 1, r), nCr(n - 1, r - 1));
}
int main() {
  memset(NCR, -1, sizeof(NCR));
  int i, n, x, tot = 0, ans = 1;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &x);
    tot += x;
    ans = mod_mul(ans, nCr(tot - 1, x - 1));
  }
  printf("%d\n", ans);
  return 0;
}
