#P2035. 汛期-2

汛期-2

Description

August is during the flood season, and BJ City experienced severe flooding. Xiao Wei needs to help carry the sandbag. The capacity of the river gate where flood occurs is vv (positive integer, 0v200000 ≤ v ≤ 20000 ), and there are nn sandbags (0n300 ≤ n ≤ 30 ), each with a volume (positive integer).

Xiao Wei will take any number of sandbags from nn and move them into the river gate, with the remaining space at the gate being the smallest.

Input Format

On the first line, enter nn and vv to represent the total amount of sandbags and the capacity of the river gate during flood season

The second line contains n integers, and the i number represents the volume of the i sandbag

Output Format

Only one integer per line represents the remaining space of the smallest flood channel gate.

Example

Input Example

6 24
8 3 12 7 9 7

Output Example

0