So easy / phyton 3 solution
a = input()
s = 0
ll = ['c','f','i','l','o','r','u','x','!']
hh = ['b','e','h','k','n','q','t','w','z',',']
pp = ['a','d','g','j','m','p','s','v','y','.',' ']
for i in range(len(a)):
if a[i] in ll:
s+=3
elif a[i] in hh:
s+=2
elif a[i] in pp:
s+=1
print(s)