m = input().split()
w = input().split()
hs, hu = input().split()

ans = 0

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

ans += int(hs)*100 - int(hu)*50
print (int(ans))