m = [int(i) for i in input().split()]
w = [int(i) for i in input().split()]
hs, hu = map(int, input().split())

point = hs*100 - hu*50

for i in range(5):
    point += max(0.3 * 500 * (i+1), ((1 - m[i]/250) * 500 * (i+1)) - 50 * w[i])

print(int(point))
