lst1=map(int,raw_input().split())
lst2=map(int,raw_input().split())
hs,hu=map(int,raw_input().split())
f=0
for i in range(0,5):
    x=500*(i+1)
    v=max(0.3*(x),(1-lst1[i]/250.0)*x-50*lst2[i])
    f=f+v
print int(f+100*hs-50*hu)