balli = 0
min_b = [500, 1000, 1500, 2000, 2500]
m_s = [int(x) for x in input().split()] #m
nev = [int(x) for x in input().split()] #w
uvz, nvz = [int(x) for x in input().split()]

for i in range(5):
    x = min_b[i]
    m = m_s[i]
    w = nev[i]
    balli += max(0.3 * x, (1 - m / 250) * x - 50 * w)
    
for i in range(uvz):
    balli += 100
for i in range(nvz):
    balli -= 100

print(int(balli))
