submission_time = list(map(int,input().split()))
wrong_submission = list(map(int,input().split()))
suc_hack,unsuc_hack = map(int,input().split())
problem_score = [500,1000,1500,2000,2500]
score = 0
for i in range(5):
    score += max(0.3*problem_score[i],(1-(submission_time[i])/250)*problem_score[i]-50*wrong_submission[i])
score += 100*suc_hack-50*unsuc_hack
print(int(score))