m = map(int, raw_input().split())
w = map(int, raw_input().split())
hs, hu = map(int, raw_input().split())
x = []
a = [2, 4, 6, 8, 10]
for i in xrange(5):
    x.append(max(0.3*a[i], (250 - m[i])*a[i] - 50*w[i]))

hs = 100*hs
hu = 50*hu
print sum(x) + hs - hu