#include <bits/stdc++.h>
using namespace std;
long long ncr[1001][1001];
long long mod = 1e9 + 7;
int main(void) {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  int c[1001];
  for (int i = 0; i < n; ++i) cin >> c[i];
  for (int i = 0; i < 1001; ++i) {
    for (int j = 0; j <= i; ++j) {
      if (i == 0 || i == j || j == 0)
        ncr[i][j] = 1;
      else {
        ncr[i][j] = (ncr[i - 1][j] + ncr[i - 1][j - 1]) % mod;
      }
    }
  }
  long long int ans = 1;
  long long int total = c[0];
  for (int i = 1; i < n; ++i) {
    ans = (ans * ncr[total + c[i] - 1][c[i] - 1]) % mod;
    total += c[i];
  }
  cout << ans;
  return 0;
}
