a="adgjmptw " b="behknqux" c="cfilorvy" d="sz" n=input() s=0 for i in n: if i in a:s+=1 elif i in b:s+=2 elif i in c:s+=3 else:s+=4 print(s)