CF431A Black Square

Description

Quite recently, a very smart student named Jury decided that lectures are boring, so he downloaded a game called "Black Square" on his super cool touchscreen phone. In this game, the phone's screen is divided into four vertical strips. Each second, a black square appears on some of the strips. According to the rules of the game, Jury must use this second to touch the corresponding strip to make the square go away. As Jury is both smart and lazy, he counted that he wastes exactly $ a_{i} $ calories on touching the $ i $ -th strip. You've got a string $ s $ , describing the process of the game and numbers $ a_{1},a_{2},a_{3},a_{4} $ . Calculate how many calories Jury needs to destroy all the squares?

Input Format

The first line contains four space-separated integers $ a_{1} $ , $ a_{2} $ , $ a_{3} $ , $ a_{4} $ ( $ 0

Output Format

Print a single integer — the total number of calories that Jury wastes.