# your code goes here
m = map(int, raw_input().split())
w = map(int, raw_input().split())
hs, hu = map(int, raw_input().split())
x = 500
s = 0
for i in xrange(5):
    s += max(3*x/10, (250-m[i])*x/250 - 50*w[i])
    x += 500
s += 100*hs
s -= 50*hu
print s