PONDO3 - Pondo Three

The Pondo are back to their hiding place, recovering from the attack from the Association of Race Swindling Eels. They have recovered some bomboo, which they store inside their hiding place.

Different Pondo can survive different amounts of times after eating a single bomboo. For example, Poh can live 12 days after eating a single bomboo however Pooh can only live 3 days after eating a single bomboo. i.e. if Poh eats at the start of day one he will live on day 12 but die before the end of day 13 unless he eats during day 13 (meaning he lived for 12 days total if he dies on day 13).

Given the amount of bomboo and the number of days each Pondo can survive after eating a bomboo, determine the maximum number of days for which all the Pondo can survive.

All the Pondo start off starving and need to eat a bomboo.

Input

The first line will contain two space-separated integers, n - the number of Pondo, and x - the number of bomboo.

Then n space-separated integers follow, the i-th of which representing the number of days the i-th Pondo will last after eating a bomboo.

Output

A single integer representing the maximum number of days all the Pondo can live (none will die).

Sample Cases

Input 1
3 17
1 2 5

Output 1
10
Input 2
10 210
1 2 3 4 5 6 7 8 9 10

Output 2
70

Added by:jslew
Date:2021-12-28
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.