#t105. 字母求和
字母求和
Letter Sum
Problem Description
Xiaoyang invented a new kind of cipher. For each lowercase English letter, that letter represents a positive integer equal to its position in alphabetical order — for example, a represents , b represents . For each uppercase English letter, that letter represents a negative integer equal to the opposite of its ASCII code — for example, A represents the negative integer . Xiaoyang used this rule to encrypt an integer and obtained a string made of uppercase and lowercase letters; the sum of the numbers represented by each letter in the string equals the original integer before encryption. For example, aAc corresponds to the original integer .
Given a string, compute what the original integer before encryption was.
Input Format
The first line contains a positive integer , the number of letters in the string.
The second line contains a string T made of uppercase and lowercase letters, representing the encrypted string.
Output Format
Output one line containing an integer: the original integer before encryption.
Sample Input
3
aAc
Sample Output
-61
Sample Explanation
For the string aAc, the letter a corresponds to , the letter A corresponds to , and the letter c corresponds to ; the sum is , so the output is .
Constraints
For all test data, it is guaranteed that .