A courier can carry any subset of n available parcels (each parcel used at most once) in a single trip, limited by the van's weight capacity C. Parcel i weighs w_i units.
Determine the maximum total weight of a subset of parcels whose combined weight does not exceed C. (The empty subset, with total weight 0, is always a valid choice.)
Input format
Line 1: two space-separated integers n C.
Line 2: n space-separated positive integers, the parcel weights.
Output format
A single integer: the maximum achievable total weight not exceeding C.
Constraints
- 1 ≤ n ≤ 34
- 1 ≤ w_i ≤ 1,000,000
- 0 ≤ C ≤ 1,000,000,000