#!/usr/bin/python a=map(str,raw_input().strip().split()) s=0 for i in range(len(a)): s=s+ord(a[i])-64 print s