Sums#859

Sums

2 seconds
64 megabytes
Very easy

Given integers a_1, a_2, \ldots, a_n. Find the number of different values of the sums of the form k_1a_1 + k_2a_2 + \ldots + k_na_n.

Input

The first line contains the number (1 \leq n \leq 500), and the second line contains the numbers a_1, a_2, \ldots, a_n (0 \leq a_i \leq 100). It is known that 0 \leq k_i \leq 1 and all numbers are integers.

Output

Print the number of different values of the sums.

Examples

Example 1

Loading
Loading