ans=0
a=map(int,raw_input().split())
b=map(int,raw_input().split())
c=map(int,raw_input().split())
e=[500,1000,1500,2000,2500]
for x in range(5):
    ans=ans+max(0.3*e[x],(1.0-a[x]/250.0)*e[x]-50*b[x]);
print int(ans)+100*c[0]-50*c[1]
