tony-and-cars
Source: hackerearth
Difficulty: UNKNOWN_DIFFICULTY

Tony is an employee at a mall. His job is to label each vehicle entering into the parking with a unique number. He starts labelling the car with 1 , 2 ,3…. N (First car with number 1, Second car with number 2 and so on).

Tony  wants to know how many digits he will have to write down in a day as he labels the arriving N cars.
Input:
First line contains T, the number of test cases to follow. (1 ≤ T ≤ 1000)
Each test case contains a integer n (1 ≤ n<10^12) denoting number of cars in a day.

Output:
For each test case print number of digits required to label the n cars.

SAMPLE INPUT
2
13
4

SAMPLE OUTPUT
17
4

Explanation

Sample

input
13
output
17
input
4
output
4

Explanation:
Note to the first test. The cars get numbers 1,2,3,4,5,6,7,8,9,10,11,12,13, which totals to 17 digits.
Note to the second sample. The cars get numbers 1,2,3,4, which totals to 4 digits.