#include <bits/stdc++.h>
using namespace std;
unsigned long long tawafeq[1001][1001];
int main(int argc, char** argv) {
  for (int i = 0; i < 1001; i++) {
    tawafeq[i][0] = 1;
    tawafeq[i][i] = 1;
    for (int j = 1; j < i; j++) {
      tawafeq[i][j] = tawafeq[i - 1][j - 1] + tawafeq[i - 1][j];
      tawafeq[i][j] %= 1000000007;
    }
  }
  int k;
  cin >> k;
  unsigned long long now = 1, nob = 0;
  unsigned long long ball[1001];
  for (int i = 0; i < k; i++) cin >> ball[i];
  for (int i = 0; i < k; i++) {
    now = now * tawafeq[nob + ball[i] - 1][nob];
    now = now % 1000000007;
    nob += ball[i];
  }
  cout << now << endl;
  return 0;
}
