xs = [500, 1000, 1500, 2000, 2500]
ms = map(int, raw_input().split())
ws = map(int, raw_input().split())
hs, hu = map(int, raw_input().split())
ans = sum(max(0.3*x, x*(1 - m/250.0) - 50*w)
          for m, w, x in zip(ms, ws, xs))
ans += 100*hs - 50*hu
print int(ans)
