Little Dwayne Johnson is hosting a programming contest. A lot of teams mail him everyday to ask about various things. Little Dwayne uses Kmail to send reply mails. But Kmail only allows sending mails per day. If some teams don't get any reply they become dissatisfied.
Little Dwayne forgets everything after each day. So if a team mailed him on -th day, he will not reply them after -th day. Now little Dwayne wonders what is the total number of dissatisfied teams. Help him or he'll start to cry.
First line contains the number of test cases (). Each test case starts with two integers and (, ), where is the number of days to consider and is the maximum number of mails little Dwayne can send per day. Next line contains integers where -th integer, () denotes the number of mails little Dwayne received on -th day.
For each test case print the number of dissatisfied teams.
1 3 10 12 5 14
In the sample, little Dwayne can send reply to at most 10 teams on first day. So 2 teams are dissatisfied. On second day no teams are dissatisfied. On third day 4 teams are dissatisfied. So total 6 teams are dissatisfied.