#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long combin[1010][1010];
int main() {
  combin[0][0] = 1;
  for (int i = 1; i <= 1000; i++) {
    combin[i][0] = 1;
    for (int j = 1; j <= i; j++) {
      combin[i][j] = (combin[i - 1][j] + combin[i - 1][j - 1]) % mod;
    }
  }
  long long ans = 1, cnt = 0, k, x;
  cin >> k;
  for (int i = 0; i < k; i++) {
    cin >> x;
    ans = (ans * combin[cnt + x - 1][x - 1]) % mod;
    cnt += x;
  }
  cout << ans << endl;
  return 0;
}
