#include <bits/stdc++.h>
using namespace std;
vector<long long int> factorial(1001);
long long int binpow(long long int a, long long int b) {
  a %= 1000000007;
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % 1000000007;
    a = a * a % 1000000007;
    b >>= 1;
  }
  return res;
}
long long int inverse(long long int x) { return binpow(x, 1000000007 - 2); }
long long int ncr(long long int n, long long int k) {
  return (factorial[n] % 1000000007 * inverse(factorial[k]) % 1000000007 *
          inverse(factorial[n - k]) % 1000000007) %
         1000000007;
}
void calfac(long long int n) {
  factorial[0] = 1;
  for (long long int i = 1; i < n; i++) {
    factorial[i] = factorial[i - 1] * i % 1000000007;
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long int c;
  cin >> c;
  vector<long long int> C(c);
  for (auto &i : C) {
    cin >> i;
  }
  long long int ans = 1;
  calfac(1001);
  for (long long int i = 1; i < c; i++) {
    long long int n = C[i - 1] + C[i] - 1;
    long long int r = C[i] - 1;
    ans = (ans % 1000000007 * ncr(n, r) % 1000000007) % 1000000007;
    C[i] += C[i - 1];
  }
  cout << ans << endl;
  return 0;
}
