m = input().split()
w = input().split()
a,b = input().split()
ans = int(a)*100 - int(b)*50
for i in range(5):
    x = (i+1)*500
    ans += max(.3*x, (1 - int(m[i])/250)*x - 50*int(w[i]))
print (int(ans))