from fractions import *
#map(int,raw_input().split())
x = [500,1000,1500,2000,2500]
m = map(int,raw_input().split())
w = map(int,raw_input().split())
hs,hf =map(int,raw_input().split())

score = Fraction(0)
for i in xrange(5):
    score += max(Fraction(3*x[i],10),(Fraction(1)-Fraction(m[i],250))*Fraction(x[i])-Fraction(50*w[i]))

print score.numerator + hs*100 - hf*50
