arr = map(int, raw_input().split())

brr = map(int, raw_input().split())

hs,hu = map(int, raw_input().split())

t = 1
ans = 0

for i in xrange(5):
    k = t*500
    u = max((150*t),(1-arr[i]/250.0)*k-50*brr[i])
    ans+=u
    t+=1
ans = int(ans)

#print ans

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

print ans
