Prakhar has a string with N words where the length of the ith word is Li.
The words are displayed in the window separated by a space. More precisely, when the sentence is displayed in a window of width W, the following conditions are satisfied.
Prakhar Wants to fit these words in M or less than M lines, find the minimum possible width W of the window.
Input Format:
The first line contains 2 space seperated integers N - the total number of words and M - the required number of lines.
The next line contains N space seperated integers Li
Output Format:
Print the minimum possible width W of the window
Constraints:
1≤N≤2∗1051≤M≤2∗1051≤Li≤109
It can be proven that we cannot fit these words in 4 or less than 4 lines with width 7 or lesser.