#include <bits/stdc++.h>
using namespace std;
long long cnk[1010][1010], n, c[1010];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> c[i];
  cnk[0][0] = 1;
  for (int i = 1; i < 1010; i++) {
    cnk[i][0] = 1;
    for (int j = 1; j <= i; j++)
      cnk[i][j] = (cnk[i - 1][j - 1] + cnk[i - 1][j]) % 1000000007;
  }
  long long res = 1, sum = c[1];
  for (int i = 2; i <= n; i++) {
    res = (res * cnk[sum + c[i] - 1][c[i] - 1]) % 1000000007;
    sum += c[i];
  }
  cout << res;
  return 0;
}
