from __future__ import division
 
time= map(int, raw_input().split())
wrong= map(int, raw_input().split())
hack= map(int, raw_input().split())
highscore= [500,1000,1500,2000,2500]
scorelist=list()
comp=0
final=0

for i in range(5):
    score= ((1- (time[i]/250) )*highscore[i] )- 50 * wrong[i]
    comp= 0.3*highscore[i]
    score= max(comp, score)
    scorelist.append(score)
finalscore= sum(scorelist)  
final=finalscore+ (hack[0]*100)
final-= (hack[1]*50) 

print int(final)