def fun(dd,ee,ff):
    return max(0.3*dd , (1- ee/250)*(dd) - 50*ff)


mi = list(map(int,input().split()))
wr = list(map(int,input().split()))
s , us = map(int,input().split())
ans=0
aa=[500, 1000, 1500, 2000, 2500]
for i in range(len(mi)):
    k=fun(aa[i],mi[i],wr[i])
    ans+=k
ans +=(s*100) 
ans-=(us*50)
print(int(ans))   