#include <bits/stdc++.h>
using namespace std;
long long C[1010][1010];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  C[0][0] = 1;
  for (int n = 1; n < 1010; ++n) {
    C[n][0] = C[n][n] = 1;
    for (int k = 1; k < n; ++k)
      C[n][k] = (C[n - 1][k - 1] + C[n - 1][k]) % 1000000007;
  }
  int k, c, sum = 0;
  long long ans = 1;
  cin >> k;
  while (k--) {
    cin >> c;
    ans = (ans * (C[sum + c - 1][c - 1] % 1000000007)) % 1000000007;
    sum += c;
  }
  cout << ans;
  return 0;
}
