#include <bits/stdc++.h>
using namespace std;
const int N = 1009, mod = 1e9 + 7;
long long k, c[N], i, j, n, ncr[N][N], ans = 1;
int main() {
  for (i = 0; i < N; i++) ncr[i][0] = 1;
  for (i = 1; i < N; i++) {
    for (j = 0; j <= i; j++)
      ncr[i][j] = (ncr[i - 1][j - 1] + ncr[i - 1][j]) % mod;
  }
  scanf("%lld", &k);
  for (i = 0; i < k; i++) {
    scanf("%lld", &c[i]);
    n += c[i];
    ans = (ans * ncr[n - 1][c[i] - 1]) % mod;
  }
  printf("%lld", ans);
  return 0;
}
