#include <bits/stdc++.h>
using namespace std;
long long int C[1010][1010];
int a[1010];
int main() {
  long long int mod = 1000000007;
  memset(C, 0, sizeof C);
  ios::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  ;
  C[0][0] = 1;
  C[1][0] = C[1][1] = 1;
  for (int i = 2; i < 1010; i++) {
    C[i][0] = 1;
    for (int j = 1; j <= i; j++) {
      C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % mod;
    }
  }
  int n;
  long long int ans = 1;
  int pre = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    ans = ((ans % mod) * (C[pre + a[i] - 1][a[i] - 1])) % mod;
    pre += a[i];
  }
  cout << ans << '\n';
}
