406828: GYM102566 E KFC

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

E. KFCtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

Jimmy is a hungry boy who really enjoys some finger lickin' good crispy strips from KFC. He bought so many that Colonel Sanders offered him a special deal.

He was presented with a pile of $$$K$$$ ($$$1 \leq K \leq 1.000.000$$$) plastic straws (because KFC had no use for them anymore after the "save the turtles" movement) and $$$N$$$ ($$$2 \leq N \leq 1.000.000$$$) buckets. In each bucket, there is an initial $$$a_i$$$ number of straws ($$$1 \leq a_i \leq 1000$$$). Jimmy was told he can take some (or all) of the straws from the pile and put them in the buckets. After that, he has to choose 2 buckets and he will receive a number of crispy strips equal to the lowest common multiple of the number of straws that are now in the 2 buckets.

Jimmy really is a hungry boy and he wants your help to get as many crispy strips as possible. To prove that you found the finger lickin' good strategy, you have to tell us the number of crispy strips that he will receive in the end.

Input

The first line of the input will contain three positive integers $$$N,\ K$$$ that represent the number of buckets and the number of straws in the pile.

The next line will contain $$$N$$$ integers $$$a_1,a_2,a_3,...,a_n$$$, where $$$a_i$$$ represents the number of straws in the $$$i$$$th bucket.

Output

The output should contain a single integer representing the maximum number of crispy strips Jimmy can receive.

ExampleInput
2 2
3 5
Output
21

加入题单

算法标签: