import sys

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

time = [int(x) for x in input().split()]
wrong = [int(x) for x in input().split()]
hacks = [int(x) for x in input().split()]
sum = 0
for i in range(5):
    current = max(vals[i]*0.3, ((vals[i]-(time[i]*vals[i]/250))) - 50*wrong[i])
    sum += current
sum += hacks[0]*100-hacks[1]*50
print(int(sum))