#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 10;
long long dp[maxn][maxn];
long long a[maxn];
long long sum, ans, n;
int main() {
  dp[0][0] = 1;
  dp[1][1] = 1;
  dp[1][0] = 1;
  for (int i = 2; i < 1005; i++) {
    dp[i][0] = 1;
    dp[i][i] = 1;
    for (int j = 1; j < i; j++) {
      dp[i][j] = (dp[i - 1][j - 1] + dp[i - 1][j]) % 1000000007;
    }
  }
  while (~scanf("%lld", &n)) {
    sum = 0, ans = 1;
    for (int i = 0; i < n; i++) {
      scanf("%lld", &a[i]);
      sum += a[i];
      ans *= dp[sum - 1][a[i] - 1];
      ans %= 1000000007;
    }
    printf("%lld\n", ans);
  }
  return 0;
}
