class Solution {
public int solution(String word) {
int answer = word.length();
char[] arr = {'A','E','I','O','U'};
int[] x = {781,156,31,6,1};
for(int i=0;i<word.length();i++){
char tmp = word.charAt(i);
for(int j=0;j<arr.length;j++){
if(arr[j]==tmp)answer+=x[i]*j;
}
}
return answer;
}
}