pts = [500, 1000, 1500, 2000, 2500]
time = [int(x) for x in raw_input().strip().split()]
wrong = [int(x) for x in raw_input().strip().split()]
success, unsuccess = [int(x) for x in raw_input().strip().split()]
problemscores = [max(0.3*pts[i], ((1 - (time[i]/250.0))*pts[i])-(50*wrong[i])) for i in range(len(pts))]
print int(sum(problemscores) + (100*success) - (50*unsuccess))