#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long dp[1005][1005];
int k;
int c[1002];
int main() {
  cin >> k;
  int n = 0;
  for (int i = 1; i <= k; i++) {
    cin >> c[i];
    n += c[i];
  }
  dp[0][0] = 1;
  for (int i = 0; i <= n; i++) {
    dp[i][0] = 1;
    for (int j = 1; j <= i; j++) {
      dp[i][j] = (dp[i - 1][j] + dp[i - 1][j - 1]) % mod;
    }
  }
  int cb = 0;
  long long ans = 1;
  for (int i = 1; i <= k; i++) {
    ans = (ans * dp[cb + c[i] - 1][c[i] - 1]) % mod;
    cb += c[i];
  }
  cout << ans << endl;
  return 0;
}
