mi = raw_input()
wi = raw_input()
su = raw_input()
m = mi.split(' ')
w = wi.split(' ')
s,u = su.split(' ')

ans = 0.0
x = [500.0, 1000.0, 1500.0, 2000.0,2500.0]
for i in range(0,5):
    ans += max(0.3*float(x[i]),(1 - (float(m[i]) / 250))*float(x[i]) - 50*float(w[i]) )

print ans