This page is still under construction.

Parts of this page are still being built. What you see may change.

What Is Your Name Score?

Interview

Time limit1sMemory limit128 MB

Summary
Given an uppercase name, sum the alphabetical position of each letter and print the total.
Level

Easy1 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

The name score is the sum of the scores of every uppercase letter in a name. The score table follows alphabetical order, that is, A=1,B=2,C=3,…,Z=26A=1, B=2, C=3, \dots, Z=26.

For a name SUNGPILSUNGPIL, the score is S(19)+U(21)+N(14)+G(7)+P(16)+I(9)+L(12)=98S(19)+U(21)+N(14)+G(7)+P(16)+I(9)+L(12)=98. For a name SOYOONSOYOON, the score is S(19)+O(15)+Y(25)+O(15)+O(15)+N(14)=103S(19)+O(15)+Y(25)+O(15)+O(15)+N(14)=103.

Given a name, write a program that computes its name score.

Input

The first line contains the length NN of the name. NN is a positive integer not exceeding 100.

The second line contains the name of length NN. It consists of uppercase letters only, with no spaces.

Output

Print the name score of the given name on the first line.

Examples2

  1. Example 1

    Input
    7
    SUNGPIL
    
    Expected output
    98
    
  2. Example 2

    Input
    6
    SOYOON
    
    Expected output
    103