Some chefs go for a tour lasting N days. They take packages of bread for food. Each package has K pieces of breads. On the i^th day, they eat Ai pieces of bread.
Unfortunately, chefs are very lazy people, and they always forget to close the package of breads, so each day the last piece of bread becomes exposed to mold (a fungus), and is no longer suitable for eating. Such a bad piece is not eaten, and is instead thrown away. 
Let us take an example. If K = 4 and N = 3, then A = {3, 1, 2}. Chefs have packages of bread each having 4 pieces of bread, and their travel lasts 3 days. In the first day, they must eat 3 pieces of bread. So they open new package of bread and eat 3 pieces. They forget to close the package, so the 4^th piece becomes bad. In the next day, they want to eat one piece of bread. And in the first package we don't have any good pieces of bread left, so they open a new package of bread and eat one piece from that. On the 3^rd day, they want to eat 2 pieces of bread. In the second package, we have three pieces, and one of them is bad; so we have 2 good pieces. They eat 2 pieces from this package. So they must buy 2 packages of bread.
Please help chefs in finding out the minimum number of packages of breads they should take with them on the tour.

Input

The first line of input contains a single integer T denoting the number of test cases.
The first line of each test contains two space separated integers N and K.
The next line of each test case contains N space separated integers denoting the number of pieces of bread the chefs want to eat each day.


Output
For each of the T test cases, output a single line - minimum number of packages of bread the chefs should take.

Constraints and Example
Input:
3
3 4
3 1 2
1 1
1
2 4
8 8

Output:
2
1
4

Explanation

Test case 1 has already been explained in the statement.


In test case 2, we have one day tour and packages with one piece each. In the first day, we have to eat one piece of bread, so we open a package and eat one piece. Tour ended, and our answer is 1.


In test case 3, we have a two days tour, and packages with 4 pieces of bread each. In the first day, we have to eat 8 pieces. We need to open two packages and eat all the pieces. In the second day, we have to eat 8 pieces again. We open two packages and eat all pieces. Tour ended. Answer is 4.
# your code goes here
import math
t=int(raw_input())
for i in range(t):
	
    temp=raw_input().split()
    days=int(temp[0])
    capacity=int(temp[1])
    required=raw_input().split()
    required=map(int,required)
    left=0
    packages_consumed=0
    for day in range(days):
        flag=0
        pack=0
        
        if left<required[day]:
            required[day]-=left
            left=0
        else:
            flag=1
            left-=required[day]    
        if flag==0:
            
            pack=int(math.ceil(float(required[day])/capacity))
            left+=pack*capacity-required[day]
        if left>0:
            left-=1
        packages_consumed+=pack
    print packages_consumed