M = input().split()
for i in range (5):
    M[i]=int(M[i])

W = input().split()
for i in range (5):
    W[i]=int(W[i])

h = input().split()
for i in range (2):
    h[i]=int(h[i])

def maxim (a,b):
    if a>=b:
        return a
    else:
        return b

res=0
x=500
for i in range(5):
    res1 = 0.3*x
    res2 = ((1-M[i]/250)*x - 50*W[i])
    res = res + maxim(res1,res2)
    x+=500

res += h[0]*100
res-=h[1]*50
print(int(res))