#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
const long long int Mod = 1000000007;
long long int C[N][N];
int main() {
  C[0][0] = 1;
  C[1][0] = C[1][1] = 1;
  for (int i = 2; i < N - 1; 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;
  }
  int n;
  int a[N];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  long long int ans = 1;
  long long int count = 0;
  for (int i = 0; i < n; i++) {
    count += a[i];
    ans = (ans * C[count - 1][a[i] - 1]) % Mod;
  }
  cout << ans;
  return 0;
}
