*on the first line is*: the natural number m;

*on the second line are*: the numbers n_{1}, n_{2}, …, n_{m}separated by a space.

内存限制：128 MiB 时间限制：1 Sec

Consider m natural numbers n_{1}, n_{2}, …, n_{m }with the property n_{1³ }n_{2³ }…³ n_{m}>0.

We define a Young table as an arrangement in a table of n_{1}+n_{2}+…+n_{m} natural numbers (bigger than 0 and any two different), so that the i^{th} line has n_{i} elements (1£ i£ m) in ascending order from left to right, and the elements from the same column are in ascending order from bottom to top.

An example of Young table for m=4, n_{1}=6, n_{2}=4, n_{3}=4, n_{4}=1 is the following:

1 |
2 |
5 |
9 |
10 |
15 |

3 |
6 |
7 |
13 |
||

4 |
8 |
12 |
14 |
||

11 |

Task:

Given n_{1}, n_{2}, …, n_{m}_{ }determine the number of Young tables containing the elements 1, 2, …, n_{1}+n_{2}+…+n_{m}.

*on the first line is*: the natural number m;

*on the second line are*: the numbers n_{1}, n_{2}, …, n_{m}separated by a space.

contain the number of Young tables that can be built.

**
**

**Constraints:**

- 1<= m<= 20
- n
_{1<=}12

```
2
```

3 2

```
```

5