Recently Rocky had participated in coding competition and he is sharing one of the problem with you which he was unable to solve. Help Rocky in solving the problem.
Suppose the alphabets are arranged in a row starting with index 0$0$ from AtoZ$A to Z$.
If in a coded language  A=27$A=27$ and AND=65$AND=65$.
Help Rocky to find a suitable formula for finding all the value for given test cases?
(All alphabets are in Upper case only).

-----Input:-----
First line of the input contains  string s$s$.

-----Output:-----
Output the possible integer values of the given string s$s$ according to the question . 

-----Constraints-----
- 1≤s≤100$1 \leq s \leq 100$

-----Sample Input:-----
A

AND   

-----Sample Output:-----
27

65

Difficulty: UNKNOWN_DIFFICULTY

Starter code:

Solutions:
s = input().strip()
start_w = 27
w_dict = {}
words = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
for word in words:
	w_dict[word] = start_w
	start_w = start_w - 1
total_wt = 0
for c in s:
	total_wt = total_wt + w_dict[c]
print(total_wt)


d = '  ZYXWVUTSRQPONMLKJIHGFEDCBA'
s = input().strip()
ans = 0
for i in s:
	ans += d.index(i)
print(ans)


n = input()
a = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
j = 0
for i in range(len(n)):
	if n[i] == 'A':
		j = j + 27
	if n[i] == 'B':
		j = j + 26
	if n[i] == 'C':
		j = j + 25
	if n[i] == 'D':
		j = j + 24
	if n[i] == 'E':
		j = j + 23
	if n[i] == 'F':
		j = j + 22
	if n[i] == 'G':
		j = j + 21
	if n[i] == 'H':
		j = j + 20
	if n[i] == 'I':
		j = j + 19
	if n[i] == 'J':
		j = j + 18
	if n[i] == 'K':
		j = j + 17
	if n[i] == 'L':
		j = j + 16
	if n[i] == 'M':
		j = j + 15
	if n[i] == 'N':
		j = j + 14
	if n[i] == 'O':
		j = j + 13
	if n[i] == 'P':
		j = j + 12
	if n[i] == 'Q':
		j = j + 11
	if n[i] == 'R':
		j = j + 10
	if n[i] == 'S':
		j = j + 9
	if n[i] == 'T':
		j = j + 8
	if n[i] == 'U':
		j = j + 7
	if n[i] == 'V':
		j = j + 6
	if n[i] == 'W':
		j = j + 5
	if n[i] == 'X':
		j = j + 4
	if n[i] == 'Y':
		j = j + 3
	if n[i] == 'Z':
		j = j + 2
print(j)


s = input().strip()
d = {}
k = 27
sum = 0
for i in range(65, 91):
	d[chr(i)] = k
	k = k - 1
for i in s:
	sum = sum + d[i]
print(sum)


s = input().strip()
n = len(s)
c = 0
for i in range(n):
	c += 26 - (ord(s[i]) - 65)
print(c + n)


n = input().strip().replace(' ', '')
ans = 0
for i in n:
	ans += 92 - ord(i)
print(ans)


s = input().strip().upper()
print(sum((ord(i) - ord('A') + 1 + ord('Z') - ord(i) + 1 for i in s)) - sum((ord(i) - ord('A') for i in s)))


import string
s = [x for x in str(input())]
d = {}
p = 0
for i in range(26):
	d[i + 1] = string.ascii_uppercase[i]
k = list(d.keys())
v = list(d.values())
for i in s:
	if i in v:
		p += 28 - k[v.index(i)]
	else:
		pass
print(p)


a = input().strip()
x = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
s = 0
for i in a:
	s += 27 - x.index(i)
print(s)


d = {'A': 27, 'B': 26, 'C': 25, 'D': 24, 'E': 23, 'F': 22, 'G': 21, 'H': 20, 'I': 19, 'J': 18, 'K': 17, 'L': 16, 'M': 15, 'N': 14, 'O': 13, 'P': 12, 'Q': 11, 'R': 10, 'S': 9, 'T': 8, 'U': 7, 'V': 6, 'W': 5, 'X': 4, 'Y': 3, 'Z': 2}
s = input().strip()
c = 0
for x in s:
	c += d[x]
print(c)


import sys
input = sys.stdin.readline
(inp, ip) = (lambda : int(input()), lambda : [int(w) for w in input().split()])
from string import ascii_uppercase as alp
dt = {}
for i in range(26):
	dt[alp[i]] = 27 - i
s = input().strip()
ans = 0
for i in s:
	ans += dt[i]
print(ans)