#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int C[1001][1001];
int main() {
  for (int i = 0; i < 1001; ++i) {
    C[i][0] = 1;
    for (int j = 1; j < i; ++j) {
      C[i][j] = C[i - 1][j - 1] + C[i - 1][j];
      if (C[i][j] >= mod) C[i][j] -= mod;
    }
    for (int j = i; j < 1001; ++j) C[i][j] = C[i][j - i];
  }
  int n;
  scanf("%d", &n);
  long long ans = 1;
  int cnt = 0;
  while (n--) {
    int x;
    scanf("%d", &x);
    ans = ans * C[cnt + x - 1][x - 1] % mod;
    cnt += x;
  }
  printf("%lld\n", ans);
}
