#include <bits/stdc++.h>
using namespace std;
const char NL = '\n';
void read(vector<long long> &a);
class Combinatorics {
 public:
  vector<vector<long long>> ncr(long long n, long long r, long long p) {
    vector<vector<long long>> dp(n + 1, vector<long long>(r + 1, 0));
    dp[0][0] = 1;
    for (long long i = 1; i <= n; i++) {
      dp[i][0] = 1;
      for (long long j = 1; j <= i; j++)
        dp[i][j] = (dp[i - 1][j] + dp[i - 1][j - 1]) % p;
    }
    return dp;
  }
  vector<long long> derangements(long long n) {
    vector<long long> der(n + 1, 0);
    der[1] = 0;
    der[2] = 1;
    for (long long i = 3; i <= n; ++i)
      der[i] = (i - 1) * (der[i - 1] + der[i - 2]);
    return der;
  }
};
inline void solve() {
  const long long MAX = 1010;
  const long long mod = 1e9 + 7;
  long long n;
  cin >> n;
  vector<long long> col(n);
  read(col);
  class Combinatorics st;
  vector<vector<long long>> ncr = st.ncr(MAX, MAX, mod);
  long long res = 1;
  long long total = 0;
  for (long long i = 0; i < n; i++) {
    res = (res * ncr[total + col[i] - 1][col[i] - 1]) % mod;
    total += col[i];
  }
  cout << res << NL;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  fflush(stdin);
  fflush(stdout);
  return 0;
}
void read(vector<long long> &a) {
  for (auto &it : a) cin >> it;
}
