m = list(map(int, input().split()))
w = list(map(int, input().split()))
h = list(map(int, input().split()))

score = h[0]*100 - h[1]*50
for i,s in enumerate([500, 1000, 1500, 2000, 2500]):
    score += max(0.3*s, (1 - m[i]/250)*s - 50*w[i])

print(int(score))
