def getinput():
    return map(int, raw_input().split())

m = getinput()
w = getinput()
hs, hu = getinput()
s = range(500, 2501, 500)
ans = 0
for i in range(5):
    ans += max(s[i] / 10 * 3, (250 - m[i]) * s[i] / 250 - 50 * w[i])

ans += hs * 100 - hu * 50
print ans
