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(int(0.3 * x), ((1 - (m / 250)) * x) - (50 * w))
    
balli += 100 * uvz
balli -= 50 * nvz

print(int(balli))
