Joe loves sleeping. He loves it so much that he’ll take naps whenever and wherever possible. He is currently on a car ride with his parents, which will be minutes long. During the trip, there will be events at distinct times that will wake Joe up if he is sleeping during those times. Joe plans to take up to naps during these minutes, and since he loves uniformity, he wants them all to be of the same length. Joe wishes to know the maximum number of minutes he can nap during the ride.
The first line will contain three integers and .
The second line will contain space separated integers, .
Output on a single line the maximum number of minutes Joe can sleep.
22 2 5 6 17
The best options is to take four 5-minute long naps during intervals , , , and .