Problem D
Espresso!

John is a student working as a part-time barista at the micro kitchen of his school department. He operates the espresso machine at the kitchen to make espresso and latte for students seeking energy to study.
Today, there are
Making an
How many times do John have to refill the water tank today
in order to serve all the
Input
The first line of input has two integers
Output
Output the number of times John has to refill the water tank of the espresso machine.
Sample Input 1 | Sample Output 1 |
---|---|
8 10 1 2L 3 4 3L 1 1L 4L |
2 |
Sample Input 2 | Sample Output 2 |
---|---|
3 12 4 4 4 |
0 |