Along the beautiful Adriatic coast, there are hotels. Each hotel has its cost in euros. Petr won 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 .
You need to calculate this maximum possible total cost.
The first line contains two integers and . The next line contains positive integers less than , 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 in all tests).