#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long comb[1003][1003], sum;
int k, c[1003];
int main() {
  cin >> k;
  for (int i = 0; i < k; i++) cin >> c[i];
  comb[0][0] = 1;
  for (int i = 1; i < 1001; i++) {
    comb[i][0] = 1, comb[i][i] = 1;
    for (int j = 1; j < i; j++) {
      comb[i][j] = (comb[i - 1][j] + comb[i - 1][j - 1]) % mod;
    }
  }
  long long sol = 1;
  for (int i = 0; i < k; i++) {
    sum += c[i];
    sol = (sol * comb[sum - 1][c[i] - 1]) % mod;
  }
  cout << sol << '\n';
  return 0;
}
