7 lines
101 B
Python
7 lines
101 B
Python
a = input().split(' ')
|
|
s = input()
|
|
|
|
count = 0
|
|
for i in s:
|
|
count += int(a[int(i)-1])
|
|
print(count)
|