a=[]
b=[]
a=list(map(int,input().split()))
b=list(map(int,input().split()))
n,m=map(int,input().split())
sum=500
ans=0
for i in range(5):
  ans+=max((0.3*sum),(1-a[i]/250)*sum-50*b[i]);
  sum+=500;
ans+=100*n;
ans-=50*m;
print(int(ans))