Problem Statement:

The MRC team at Orange labs designs embedded sensing nodes and provides connectivity to tie them to the internet of things.

Nowadays they are working on building seven segment displays, but how many seven segment displays will they need to represent an Integer x.

They use one seven segment display to represent one digit of an Integer.

For example: Integer "100" needs "3" seven segment boards to be represented.

Can you help them figure out how many displays are needed?

Input Format:

The first line contains an integer T, the number of test cases. Followed by T lines, each line contains a test case which consists of one positive integer needs to be represented using seven segment display, that number will be at most 1000000.

Output Format:

For each test case, print a single line containing the number of digits of that integer.

Sample Input:

2
1
1000

Sample Output:

1
4