s1 = input()
s2 = input()
h,h1 = map(int,input().split())

a = s1.split(" ")
b = s2.split(" ")
a = [int(i) for i in a]
b = [int(i) for i in b]
r = 0
for i in range(5):
    x = 500*(i+1)
    r = r+ max(.3*x,(1-a[i]/250)*x-50*b[i])

r = r+100*h-50*h1

print (int(r))
