Coins 2

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

In ICPCCamp, people usually use coins of values 1,2,3,,n1, 2, 3, \dots, n

Bobo was very poor, he had only a_1,a_2,a_3,,a_na\_1, a\_2, a\_3, \dots, a\_n coins of values 1,2,3,,n1, 2, 3, \dots, n, respectively. He bought an item of an unknown value without making change.

The unknown item was of non-negative integer value. Find the number of possible values it may have had.

입력

The input contains zero or more test cases, and is terminated by end-of-file. For each test case:

The first line contains one integer nn (1n151 \leq n \leq 15).

The second line contains nn integers a_1,a_2,,a_na\_1, a\_2, \dots, a\_n (0a_i1090 \leq a\_i \leq 10^9). 

It is guaranteed that the number of test cases does not exceed 100100, and there is at most one test case where n>10n > 10.

출력

For each test case, output an integer which denotes the number of possibilities.