#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int MAXN = 1003;
int C[MAXN][MAXN];
void build() {
  C[0][0] = 1;
  for (int i = 1; i < MAXN; i++) {
    C[i][0] = C[i][i] = 1;
    for (int j = 1; j < i; j++) {
      C[i][j] = C[i - 1][j] + C[i - 1][j - 1];
      if (C[i][j] >= MOD) C[i][j] -= MOD;
    }
  }
}
int main() {
  build();
  int n, ans = 1, cnt = 0;
  int a;
  cin >> n;
  while (n-- > 0) {
    scanf("%d", &a);
    ans = (long long)ans * C[cnt + a - 1][cnt] % MOD;
    cnt += a;
  }
  cout << ans << endl;
}
