score = 0
m = [0,0,0,0,0]
w= [0,0,0,0,0]
p = [500, 1000, 1500, 2000, 2500]
line = raw_input()
i = 0
for part in line.split(' '):
    m[i] = float(part)
    i+=1

i = 0
line = raw_input()
for part in line.split(' '):
    w[i] = int(part)
    val1 =  int(0.3*float(p[i])) 
    val2 = (1.0-m[i]/250.0)*(p[i])
    #print( val1 )
    #print(  val2  )
    score  += max( val1,   val2  - 50*w[i])
    i+=1

line = raw_input()
line = line.split(' ')
hs = int(line[0])
hu = int(line[1])
score += hs*100 - 50*hu
score = int(score*10)/10
print(score)
