Program Template#4180

Program Template

1 second
64 megabytes
Very easy

Many teams participating in programming competitions use a "program template." This template is typed at the start of the competition and includes common elements for all solutions, such as opening and closing input and output files.

The three-time world champion team, the Dream Team, as recognized by AMC, is no exception. A significant part of their success is attributed to their meticulous preparation, which includes attention to even the smallest details. For instance, before their last final, during a trial round, they calculated the energy expenditure in joules required to type their template.

The keyboards used in the final had varying key stiffness, meaning different keys required different amounts of energy to press.

Through experiments conducted during the trial round, the Dream Team discovered the following energy requirements: Typing a lowercase Latin letter requires energy equal to the sum of the digits of its position in the alphabet (with letters numbered starting from one). Pressing the "Shift" key requires joules of energy, so typing an uppercase letter requires joules more than the corresponding lowercase letter. The "Space" key requires joules. Typing the digit requires 13-x joules. A period requires joules, a semicolon requires joules, and a comma requires joules. The equal sign, plus, minus, single and double quotes each require joules. Closing and opening parentheses require joule each, while curly, square, and angle brackets (i.e., symbols < and >) require joules each. For all these punctuation marks, there are dedicated keys on the keyboard used in the final, and no alternative method exists to type these symbols. Pressing the "Enter" key (newline) is so effortless that its energy expenditure is considered zero.

Your task is to write a program that calculates the energy expenditure for typing the template based on the text provided.

Input

The input file contains the program template for which the energy expenditure needs to be calculated. It includes only digits, spaces, lowercase and uppercase Latin letters, periods, commas, equal signs, pluses, semicolons, double quotes ("), single quotes ('), and closing and opening round, square, curly, and angle brackets.

The size of the template does not exceed bytes.

Output

In the output file, print the total energy expenditure required to type the template.

Examples

Example 1

Loading
Loading