#include <bits/stdc++.h>
using namespace std;
int p[1005][1005], a[1005];
void pre() {
  int i, j;
  for (i = 0; i <= 1001; i++) {
    for (j = 0; j <= i; j++) {
      if (j == 0 || j == i)
        p[i][j] = 1;
      else
        p[i][j] = (p[i - 1][j - 1] + p[i - 1][j] * 1LL) % 1000000007;
    }
  }
}
int main() {
  int n, sum, i;
  long long int ans;
  cin >> n;
  pre();
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  sum = a[0];
  ans = 1;
  for (i = 1; i < n; i++) {
    ans = ans * (p[sum + a[i] - 1][a[i] - 1]) % 1000000007;
    sum += a[i];
  }
  cout << ans;
  return 0;
}
