mi = map(int, input().split())
minutes = list(mi)
wr = map(int, input().split())
wrong = list(wr)
h = map(int, input().split())
hacks = list(h)
max_point = [500, 1000, 1500, 2000, 2500]
score = 0

def Score_law(x, m, w) :
    fir = 0.3 * x
    sec = ( (1 - (m / 250) ) * x ) - (50 * w)
    law = max(fir, sec)
    return law

def getHacks(hacks) :
    hack_score = sum(hacks) * 100
    return hack_score

for i in range(5) :
    x = max_point[i]
    m = minutes[i]
    w = wrong[i]
    score += Score_law(x, m, w)

hack_score = getHacks(hacks)
total_Score = int(score + hack_score)

print(total_Score)
