LearnPy Hub
← Arena
EasyRating 900

Highlighted Word

Each lowercase letter has a height (26 numbers for a–z). Every letter is 1 unit wide. Print the area of the rectangle that highlights the word: its length times the tallest letter.

Input

26 integers, then a word.

Output

One integer.

Sample 1

Input
1 3 1 3 1 4 1 3 2 5 5 5 5 1 1 5 5 1 5 2 5 5 5 5 5 5
torn
Output
8

Sample 2

Input
2 1 2 1 7 5 5 6 7 5 2 7 7 6 2 4 4 7 6 1 4 3 7 1 1 3
myx
Output
21
solution.py
Output appears here
Highlighted Word · Python Arena problem · LearnPy Hub