from fractions import Fraction
mps = [500, 1000, 1500, 2000, 2500]
mins = list(map(int,input().split()))
ws =  list(map(int,input().split()))
hs,hu = map(int, input().split())
ans=0
for i in range(5):
    ans+=max(Fraction(3,10)*mps[i], Fraction(250-mins[i],250)*mps[i]-50*ws[i])
ans+=100*hs-50*hu
print(ans)