
def cal(x, m, w):
    return max(0.3 * x, (1 - m/250.0) * x - 50 * w)

m = map(int, raw_input().split())
w = map(int, raw_input().split())
hs, hu = map(int, raw_input().split())

ans = hs * 100 - hu * 50
x = 500
for i in xrange(len(m)):
    ans += cal(x, m[i], w[i])
    x += 500

print("%.0f"%(ans))
