Parade Photo Batteries
A parade route has photo stalls placed from west to east. Stall is at coordinate and has a tallest decoration of height .
A drone trip may photograph one nonempty consecutive group of stalls, from stall through stall . The battery rating required for that trip is
If , the distance part is .
You may schedule at most trips. Every stall must be photographed exactly once, and the groups photographed by the trips must form a partition of stalls in order. The same battery rating is used for every trip, so each trip must have required rating at most .
Find the minimum possible integer value of .
Input
The first line contains two integers and (), the number of stalls and the maximum number of trips.
Output
Print one line containing one integer: the minimum possible battery rating .
Samples
Sample 1
Input
5 3 0 2 5 9 10 3 8 4 6 2
Output
10
The trips can cover stalls through , stalls through , and stall ; their required ratings are , , and , respectively. A rating below is not sufficient for this instance.