Help me with is ------->The success of IEEE code-quest depends on number of times the factor is present in a given string.Help core members to find them

Factor of string is defined as a substring.In this case it’s ‘01’.

Input

First line of input contains an integer T, denoting the number of test cases. Then follows description of T cases.Each line of input is a binary form.

Output

Print the number of times the factor is present in a given string.

Constraints

1 <= S <= 100000

1 <= T <= 50

USE C PROGRAM

TEST CASE 1

INPUT

2

1001010100001

100101

OUTPUT

4

2

TEST CASE 2

INPUT

1

10001000101

OUTPUT

3