import sys

time = sys.stdin.readline().split()
time = [int(x) for x in time]


wrongs = sys.stdin.readline().split()
wrongs = [int(x) for x in wrongs]


hacks = sys.stdin.readline().split()
hacks = [int(x) for x in hacks]

maxvals = [500,1000,1500,2000,2500]

score = 0
for i in range(5):
    score += max(0.3*maxvals[i], (1-float(time[i])/250)*maxvals[i]-50*wrongs[i])

score += 100*hacks[0]
score -= 50*hacks[1]


print(int(score))

