Along the beautiful Adriatic coast, there are n hotels. Each hotel has its cost in euros. Petr won m euros in the lottery. Now he wants to buy a sequence of consecutive hotels one after another so that the sum of the costs of these consecutive hotels is as large as possible, but does not exceed m.
You need to calculate this maximum possible total cost.
The first line contains two integers n and m (1≤n≤3⋅105,1≤m<231). The next line contains n positive integers less than 106, representing the costs of the hotels in the order they are located along the coast.
Print the desired maximum cost (it will be greater than 0 in all tests).