m = list(map(int,input().split()))
w = list(map(int,input().split()))
hs,hu = map(int,input().split())


s=0
def score(x,m,w):
    return max(0.3*x,(1-m/250)*x-50*w)

for i in range(1,6):
    s += score(500*i,m[i-1],w[i-1])

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

