s,r=map(str,input().split())
y=0
if len(s)>len(r):
	s,r=r,s
p=0
while p<len(s):
	  y+=(ord(r[p])-ord(s[p]))
	  p+=1
for p in range(p,len(r)):
	  y+=ord(r[p])-ord('a')+1
print(y)

0f1cc507a42d165d4dbc42d8fdd8984f40a24e68
<mask token>

<mask token>
if len(s) > len(r):
    s, r = r, s
<mask token>
while p < len(s):
    y += ord(r[p]) - ord(s[p])
    p += 1
for p in range(p, len(r)):
    y += ord(r[p]) - ord('a') + 1
print(y)

s, r = map(str, input().split())
y = 0
if len(s) > len(r):
    s, r = r, s
p = 0
while p < len(s):
    y += ord(r[p]) - ord(s[p])
    p += 1
for p in range(p, len(r)):
    y += ord(r[p]) - ord('a') + 1
print(y)

s,r=map(str,input().split())
y=0
if len(s)>len(r):
	s,r=r,s
p=0
while p<len(s):
	  y+=(ord(r[p])-ord(s[p]))
	  p+=1
for p in range(p,len(r)):
	  y+=ord(r[p])-ord('a')+1
print(y)
