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: interview

Starter code:

Solutions:
# cook your dish here
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)

# cook your dish here
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))

# cook your dish here
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)

# cook your dish here
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)

# cook your dish here
a = input().strip()
x="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
s=0
for i in a:
    s+=(27-x.index(i))

print(s)

# cook your dish here
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}
# for _ in range(int(input())):
s = input().strip()
c = 0
for x in s:
    c+=d[x]
print(c)

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

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

#dt = {} for i in x: dt[i] = dt.get(i,0)+1
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)