Given a positive integer N, find how many times the digit 3 appears in the number. Input contains number of test cases ‘t’ followed by t lines each line containing an integer N.

Constraints:

0<=N<=10^15

SAMPLE INPUT:

3

134523383

333331

1245

OUTPUT:

4

5

0

Hint: Consider the range of data type to be used..!

Leave a Reply