word = input()
time = 0

for c in word:
    if c in "ABC":
        time = time + 3
    elif c in "DEF":
        time = time + 4
    elif c in "GHI":
        time = time + 5
    elif c in "JKL":
        time = time + 6
    elif c in "MNO":
        time = time + 7
    elif c in "PQRS":
        time = time + 8
    elif c in "TUV":
        time = time + 9
    elif c in "WXYZ":
        time = time + 10

print(time)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: