scores = [500, 1000, 1500, 2000, 2500]
mins = map(int, raw_input().split())
wrongs = map(int, raw_input().split())
hs, hu = map(int, raw_input().split())
tot_score = 0
for i in range(5):
    tot_score += max(0.3*scores[i], scores[i]-(mins[i]*scores[i]/250)-(50*wrongs[i]))
tot_score += (100*hs) - (50*hu)
print int(round(tot_score))
