#include #include #include #include #include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int a[26]; for(int i=0;i<26;i++){ cin >> a[i]; } string s; cin >> s; int max_height=0; for(int i=0;imax_height){ max_height=a[s[i]-'a']; } } cout << max_height*s.length(); return 0; }