if __file__.endswith('code.py'):
    import sys
    sys.stdin = open('input.txt')

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

res = 100 * hs - 50 * hu
for i in xrange(5):
    x = 500 * (i + 1)
    res += max(0.3 * x, (1 - 1. * m[i] / 250) * x - 50 * w[i])

print int(res + 1e-9)
