import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; import java.util.Collections; import java.util.ArrayList; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int h[] = new int[26]; int breadth; ArrayList ar = new ArrayList(); for(int i=0; i < 26; i++){ h[i] = in.nextInt(); } String word = in.next(); int len = word.length(); for(int j=0; j max) max = number; } System.out.println(len*max); } }