Now you will know each section of noodles in Jasmine’s bowl, please calculate at least how many times Jasmine will cut the noodles so that she can eat all noodles. Assuming Jasmine can only pick one section to eat at one time, and for each cut she can only divide one section into two section.
There are multiple cases.
For each case, the first line contains two integer N and M, indicating there are N sections of noodles in the bowl and Jasmine can eat at most length M of a section at one time.
The second line contains N integers Li, indicating the length of each section.
All integers will be in the range of 1 to 100 inclusively.
For each case, output at least how many times Jasmine will cut the noodles so that she can eat all noodles.
5 2 1 2 3 4 5 2 3 3 3
4 0