#include <bits/stdc++.h>
using namespace std;
int n;
int c[1005];
int sum[1005];
long long dp[1005];
const int Mod = 1e9 + 7;
int Pow(long long x, int y) {
  if (y == 0) {
    return 1;
  } else if (y == 1) {
    return x;
  }
  if (y % 2 == 0) {
    return Pow(x * x % Mod, y / 2) % Mod;
  } else {
    return Pow(x * x % Mod, y / 2) % Mod * x % Mod;
  }
}
int inv(int x) { return Pow(x, Mod - 2) % Mod; }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &c[i]);
    sum[i] = sum[i - 1] + c[i];
  }
  dp[1] = 1;
  for (int i = 2; i <= n; i++) {
    int b = sum[i - 1] + c[i] - 1;
    int a = c[i] - 1;
    dp[i] = dp[i - 1];
    for (int j = 1; j <= a; j++) {
      dp[i] = (dp[i] * (b - j + 1)) % Mod;
      dp[i] = (dp[i] * inv(j)) % Mod;
    }
  }
  printf("%I64d", dp[n]);
  return 0;
}
