#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1.0);
const double EPS = 1E-6;
const int INF = 2 * (1e+9) + 1;
const int MAXN = 3 * 100000001;
const int MOD = (1e+9) + 7;
long long c[1003][1003];
const int MD = 1000000000 + 7;
int main() {
  c[0][0] = 1;
  for (int i = 1; i <= 1000; i++) {
    c[i][0] = c[i][i] = 1;
    for (int j = 1; j < i; j++) {
      c[i][j] = c[i - 1][j] + c[i - 1][j - 1];
      if (c[i][j] >= MD) {
        c[i][j] -= MD;
      }
    }
  }
  long long ans = 1;
  int n;
  cin >> n;
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    sum += x - 1;
    ans = (ans * c[sum][x - 1]) % MD;
    sum++;
  }
  cout << ans << endl;
  return 0;
}
