#include <bits/stdc++.h>
using namespace std;
const int MAX = 2100;
long long c[MAX][MAX];
const int mod = (int)1e9 + 7;
inline void load(int n) {
  c[0][0] = 1;
  for (int i = 1; i < n; i++) {
    c[i][0] = 1;
    c[i][i] = 1;
    for (int j = 1; j < i; j++) {
      c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % mod;
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  load(MAX);
  long long ans = 1;
  int n, k, C = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> k;
    ans = (ans * c[k + C - 1][C]) % mod;
    C += k;
  }
  printf("%I64d\n", ans);
  return 0;
}
