mms = [500, 1000, 1500, 2000, 2500]
ms = map(int, raw_input().split())
ws = map(int, raw_input().split())
s, u = map(int, raw_input().split())
ans = s*100 - u*50
for i in range(5):
    ans += max(.3*mms[i], (1-(ms[i]/250.0))*mms[i] - 50*ws[i])
print int(ans)