Given a string, your task is to find the number of patterns of form 1[0]1 where [0] represents any number of zeroes (minimum requirement is one 0) there should not be any other character except 0 in the [0] sequence.

**Input:**

The first line contains T denoting the number of testcases. Then follows description of testcases. Each case contains a string.

**Output:**

For each test case, output the number of patterns.

**Constraints:**

1<=T<=20

1<=Length of String<=2000

**Example:**

**Input:**

2

100001abc101

1001ab010abc01001

**Output:**

2

2

just_kiddin | 48 |

Paras Chadha | 47 |

chaitanyaanimesh | 46 |

Jihye Sofia Seo | 44 |

Anshu Ahirwar | 44 |

gameghost07 | 488 |

xyz2017 | 460 |

N NAGA SAI KRISHNA | 445 |

Anshu Ahirwar | 419 |

Divyasri | 408 |

akhayrutdinov | 3371 |

sanjay05 | 3239 |

Jasleen Kaur 2 | 2012 |

Elite Coder | 1803 |

Michael Riegger | 1788 |