i = [500, 1000, 1500, 2000, 2500]
ms = map(int, raw_input().split())
ws = map(int, raw_input().split())
hs, hu = map(int, raw_input().split())

scores = [max(0.3*x, (1-m/250.0)*x - 50*w) for (x, m, w) in zip(i, ms, ws)]
print int(sum(scores) + 100*hs - 50*hu)