At a railway station, there are ticket counters, but only a single queue leading to them. The service process works as follows:
Initially, when all counters are free, the first people from the queue take the counters. The remaining customers wait in line. As soon as a counter becomes available after serving a customer, the next person in the queue takes the vacant spot. This process continues until all customers have been served.
Determine the minimum time required to serve all customers.
The first line contains two integers: the size of the queue and the number of ticket counters (1 \le n \le 10^5, 1 \le k \le 10^4).
The second line contains positive integers t_i (1 \le t_i \le 10^5) — the service time for the -th customer.
Print one integer — the minimum time required to serve the entire queue.
Example 1
Example 2