def textToInt(lst):
    for i in lst:
        lst[lst.index(i)] = int(i)
    return lst

x = [500, 1000, 1500, 2000, 2500] #each round's points

text = raw_input()
m = textToInt(text.split()) #time

text = raw_input()
w = textToInt(text.split()) #wrong submitions

text = raw_input()
h = textToInt(text.split()) #hacks

pblmScores = []
#calculate each problem's score:
for i in range(5):
    pblmScores.append(max(0.3*x[i],
                          (250-m[i]) * (x[i]/250) - 50*w[i]))

hackScore = h[0]*100 - h[1]*50

total = 0
for i in pblmScores:
    total += i

total += hackScore
print total
