#include #include using namespace std; int main() { map letters; for (int x=0; x<26; x++) { int temp; cin >> temp; letters[97+x] = temp; } string word; cin >> word; int height(0); for (int x=0; x height) height = temp; } cout << height * word.size() << endl; return 0; }