In the fest of Paradigm, every organiser is given a special kind of pager. The pager consists of a screen and a single big red button. To type a message in it, one has to push the red button that many time at which the alphabet occurs in the alphabetical order. For example for typing D, one needs to push button 4 times.
To write a word one has to type the first word, wait for 2 seconds and then type the second word and so on.

You have to determine the value of the pushes required to type a word to send the message.

 

Input
The first line will be number of strings n.
Subsequent n lines will consist of a string (say S) with no spaces in between.

 

Output
Output will be a number determining the number of pushes required to type the string, S
 

Constraints

String size, len will be 1 ≤ len ≤ 50
1 ≤ n ≤ 50
String will have no spaces, either in between, leading or trailing
String will be in upper case ('A' - 'Z')

 

Example
Input:
2
A
AB

Output:
1
3
 

Explanation
Example case 1.
One needs to push once.

Example case 2.
1 push for A and 2 pushes for B, 1+2=3
n=int(input())
l=[]
for i in range(0,n):
 x=raw_input()
 val=0
 for char in x:
  val=val+ord(char)-64
 l.append(val)
for i in l:
 print i