#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 2020;
const long long MOD = 1000000007;
long long a[MAXN];
long long ncr[MAXN][MAXN];
void myinit() {
  ncr[0][0] = 1;
  for (long long i = 1; i < MAXN; i++)
    for (long long j = 0; j <= i; j++) {
      ncr[i][j] = ncr[i - 1][j];
      if (j > 0) ncr[i][j] = ((ncr[i][j] + ncr[i - 1][j - 1]) % MOD);
    }
}
long long mynhr(long long n, long long r) { return ncr[n + r - 1][r - 1]; }
int main() {
  myinit();
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long bucket = a[0] + 1;
  long long ans = 1;
  for (long long i = 1; i < n; i++) {
    ans = (ans * mynhr(a[i] - 1, bucket)) % MOD;
    bucket += a[i];
  }
  cout << (ans % MOD) << endl;
  return 0;
}
