a=map(float, raw_input().split())
b=map(int, raw_input().split())
c=map(int, raw_input().split())
d=0
for i in range(5):
    if 0.3*(500*(i+1))<(1-a[i]/250)*(500*(i+1))-50*b[i]:
        d+=(1-a[i]/250)*(500*(i+1))-50*b[i]
    else:
        d+=0.3*(500*(i+1))
print d+100*c[0]-50*c[1]