#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int *arr = new int[n];
  int *csum = new int[n];
  int **pascal = new int *[1001];
  for (int i = 0; i < 1001; i++) {
    pascal[i] = new int[1001];
    for (int j = 0; j < 1001; j++) {
      if (j > i)
        pascal[i][j] = 0;
      else if (i == j)
        pascal[i][j] = 1;
      else if (j == 0)
        pascal[i][j] = 1;
      else {
        pascal[i][j] = (pascal[i - 1][j - 1] + pascal[i - 1][j]) % 1000000007;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (i == 0)
      csum[i] = arr[i];
    else
      csum[i] = csum[i - 1] + arr[i];
  }
  long long int sum = 1;
  for (int i = 1; i < n; i++) {
    sum = (sum * pascal[csum[i - 1] + arr[i] - 1][csum[i - 1]]) % 1000000007;
  }
  cout << sum << endl;
  return 0;
}
