PROGRAMMING:Happy WLS
WLS is very happy today, because there are no annoying party members scolding him.
So he began to study the robots in his warehouse. On the premise of being able to transport the goods completely, he wanted to control the robot's maximum transportation weight to a certain amount, because it could save the cost.
**Robots are very stupid. They transport goods from the front to the back. That is to say, only after taking the first batch can they take the second batch. However, each robot can transport multiple batches at the same time, which depends on the maximum transport weight of the robot**
The robot will transport as many goods as possible until the transportation is completed. WLS now has m robots. There are n batches of goods coming from the warehouse. He wants the robots to transport the maximum and the minimum, but they must transport them all at one time** Can you help him?
For example:
Now the maximum transportation weight is 5, and the weight of goods is 24 1 in turn. Then the robot will only transport the first one, because the order is from front to back, but 2 + 4 > 5, so the robot can't transport the second one.
Now the maximum transport weight is 6, and the cargo weight is 2, 4 and 1 in turn, so the robot will transport the first two.
Now the maximum transport weight is 6, and the cargo weight is 2 in turn, so the robot will transport the first three.
###Input format:
The first line, N, m, has the same meaning as the title
The number of N in the second line, representing n batches of goods, is given according to the batch of goods.
1 $$$Le $$n $$Le $$3E5, 1 $$$Le $$M $$$Le $$n, 1 $$$Le $$weight of goods $$$Le $$100
###Output format:
Output minimum maximum traffic volume
###Input example:
```in
3 1
2 4 1
```
```in
3 2
2 4 1
```
```in
3 3
2 4 1
```
###Output example:
```out
seven
```
```out
five
```
```out
four
```
answer:If there is no answer, please comment
So he began to study the robots in his warehouse. On the premise of being able to transport the goods completely, he wanted to control the robot's maximum transportation weight to a certain amount, because it could save the cost.
**Robots are very stupid. They transport goods from the front to the back. That is to say, only after taking the first batch can they take the second batch. However, each robot can transport multiple batches at the same time, which depends on the maximum transport weight of the robot**
The robot will transport as many goods as possible until the transportation is completed. WLS now has m robots. There are n batches of goods coming from the warehouse. He wants the robots to transport the maximum and the minimum, but they must transport them all at one time** Can you help him?
For example:
Now the maximum transportation weight is 5, and the weight of goods is 24 1 in turn. Then the robot will only transport the first one, because the order is from front to back, but 2 + 4 > 5, so the robot can't transport the second one.
Now the maximum transport weight is 6, and the cargo weight is 2, 4 and 1 in turn, so the robot will transport the first two.
Now the maximum transport weight is 6, and the cargo weight is 2 in turn, so the robot will transport the first three.
###Input format:
The first line, N, m, has the same meaning as the title
The number of N in the second line, representing n batches of goods, is given according to the batch of goods.
1 $$$Le $$n $$Le $$3E5, 1 $$$Le $$M $$$Le $$n, 1 $$$Le $$weight of goods $$$Le $$100
###Output format:
Output minimum maximum traffic volume
###Input example:
```in
3 1
2 4 1
```
```in
3 2
2 4 1
```
```in
3 3
2 4 1
```
###Output example:
```out
seven
```
```out
five
```
```out
four
```
answer:If there is no answer, please comment