A tasting tray holds n samples, each of a whole-number size. Consider every possible subset of the samples, including the empty subset (whose total size is 0). Count how many distinct total sizes are achievable across all subsets. Two subsets that share the same total count as one distinct total.
Input format
Line 1: an integer n.
Line 2: n space-separated integers, the sample sizes.
Output format
A single integer: the number of distinct achievable subset totals (0 is always one of them).
Constraints
- 1 <= n <= 40
- 1 <= each size <= 1000