import sys
m = list(map(int,input().split()))
w = list(map(int,input().split()))
hs,hu = map(int,input().split())
point = [500,1000,1500,2000,2500]
res = 0
for i in range(5):
    res += max(0.3*point[i],((1- (m[i]/250) )*point[i] - 50*w[i]))

res += hs*100 - hu*50

print(int(res))