#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
const int MOD = 1E9 + 7;
int n, x, c[N][N], ans = 1, sum;
int main() {
  c[0][0] = 1;
  for (int i = 1; i < N; i++) {
    c[i][0] = 1;
    for (int j = 1; j <= i; j++)
      c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % MOD;
  }
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x);
    sum += x;
    ans = ((long long)ans * c[sum - 1][x - 1]) % MOD;
  }
  cout << ans << endl;
}
