x=[500.00,1000.00,1500.00,2000.00,2500.00]
p=0
m=map(float,raw_input().split())
w=map(float,raw_input().split())
for i in range(5):
    p+=max(0.3*x[i],((1-m[i]/250)*x[i] - 50*w[i]))
h=map(int,raw_input().split())
p+=100*h[0]-50*h[1]
print int(p)
