#include <bits/stdc++.h>
long long mpow(long long t, long long k, const long long &m) {
  long long ans = 1;
  for (; k > 0; k >>= 1, t = t * t % m)
    if (k & 1) ans = ans * t % m;
  return ans;
}
long long rev(const long long &k, const long long &m) {
  return mpow(k, m - 2, m);
}
const long long mo = 1e9 + 7;
long long F[1001];
long long C(int n, int k) {
  return F[n] * rev(F[k], mo) % mo * rev(F[n - k], mo) % mo;
}
int main() {
  F[0] = 1;
  for (long long i = 1; i <= 1000; ++i) F[i] = F[i - 1] * i % mo;
  int n;
  scanf("%d", &n);
  long long ans = 1, s = 1;
  for (int i = 0, u; i < n; ++i) {
    scanf("%d", &u);
    ans = ans * C(s + (long long)u - 2ll, s - 1ll) % mo;
    s += u;
  }
  printf("%d\n", (int)ans);
  return 0;
}
