#include <bits/stdc++.h>
using namespace std;
inline long double min(long double a, long double b) {
  if (a < b) return a;
  return b;
}
inline long double max(long double a, long double b) {
  if (a < b) return b;
  return a;
}
int n;
int k;
int arr[1100];
long long res;
int main() {
  int f[1111][1111];
  cin >> k;
  for (int(i) = (0); (i) < (k); ++(i)) {
    cin >> arr[i];
    n += arr[i];
  }
  res = 1;
  int cnt = n;
  for (int i = 0; i <= cnt; ++i) f[i][0] = 1;
  for (int i = 1; i <= cnt; ++i)
    for (int j = 1; j <= cnt; ++j)
      f[i][j] = (f[i - 1][j - 1] + f[i - 1][j]) % 1000000007;
  for (int i = k - 1; i >= 0; i--) {
    res *= f[n - 1][arr[i] - 1];
    res = res % 1000000007;
    n -= arr[i];
  }
  cout << res << endl;
  return 0;
}
