tim = [0,0,0,0,0]
wrong = [0,0,0,0,0]
hacks = [0,0]
tim[0], tim[1], tim[2], tim[3], tim[4] = input().split()
wrong[0], wrong[1], wrong[2], wrong[3], wrong[4] = input().split()
hacks[0], hacks[1] = input().split()
point = [500, 1000, 1500, 2000, 2500]
score = 0
for i in range(0,5):
    point[i] = int(point[i])
    wrong[i] = int(wrong[i])
    tim[i] = int(tim[i])
    score += max(0.3 * point[i], (1 - tim[i]/250.0) * point[i] - 50 * wrong[i])
hacks[0] = int(hacks[0])
hacks[1] = int(hacks[1])
score += (100 * hacks[0] - 50 * hacks[1])
print(int(score))