#include <bits/stdc++.h>
using namespace std;
long long int n, sol = 1, acc, t;
int C[1003][1003];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie();
  C[0][0] = 1;
  for (int i = 1; i <= 1000; i++)
    for (int j = 0; j <= i; j++)
      C[i][j] =
          (j == 0 ? 1LL : 1LL * C[i - 1][j - 1] + C[i - 1][j]) % 1000000007;
  cin >> n;
  while (n-- && cin >> t) {
    acc += t;
    sol = 1LL * sol * C[acc - 1][t - 1] % 1000000007;
  }
  cout << sol % 1000000007;
  return 0;
}
