With a bit of thinking, all the bunnies were snuggled as close to the mud as possible. Happy and contented, they all went home, except for one especially short and fluffy bunny. This bunny began laughing maniacally and said to Po.
"Hahaha, that was fun. My name is Tu Zi. Oh, here's the Dragon Scroll you wanted. Don't worry, I didn't mean any harm and I just wanted to play a game with you. Congratulations for solving all the puzzles I set for you! You did it way faster than I expected! Can I reward you with a bowl of my Awesome Super Long noodles? I know they're nowhere as good as Ping's, but still, they're really not bad."
Quite obviously, Po would like to try those noodles.
"Oh, haha. I just thought of another puzzle! My noodle cutting skills are really awesome, and I have batches of pre-made noodles, each of exactly the same length. But since you're so smart, I want to reward you with the longest noodle ever! However, I must not be able to form this noodle length by joining up the other noodles that I already have. Ha! Take that! Bet you'll take super long to solve this."
Po wants the longest noodle that he can get, but oh no! He's hungry and can't think when he's hungry. To satisfy his extreme hunger, Po must eat noodles that are of at least a certain length. After all, he can't be eating thin slices of noodles, right? Help him out by telling him the noodle length he should ask for.
The first line contains two integers, n and k. n represents the number of batches of noodles Tu Zi has and k represents the minimum length of the noodle that Po wants to eat.
The following line contains n integers, representing the length (1 ≤ length ≤ 1,000) of each noodle in each batch of Tu Zi's noodles.
For all test cases, 1 ≤ n ≤ 10.
Output the maximum noodle length that cannot be made with all the other noodles that Tu Zi has made. If the maximum length is infinite, output -1. If there is no such length that will satisfy Po's growling stomach, output -2.
After 3, all the noodle lengths can be formed with lengths 2 and 5, and 3 satisfies Po's hunger.