#include <bits/stdc++.h>
using namespace std;
int main() {
  long long s[1010][1010] = {0};
  int t;
  int a = 1;
  int q;
  long long ans = 1;
  for (int i = 0; i < 1010; i++) s[i][0] = 1;
  for (int i = 1; i < 1010; i++)
    for (int j = 1; j < 1010; j++)
      s[i][j] = (s[i][j - 1] + s[i - 1][j]) % 1000000007;
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> q;
    ans = (ans * s[a][q - 1]) % 1000000007;
    a += q;
  }
  cout << ans;
}
