'''
CodeForces Score Calculator
'''
def calculate():
    m = input().split()
    w = input().split()
    h1,h2 = input().split()
    s = []
    maxs = [500,1000,1500,2000,2500]
    
    for i in range(5):
        a = (1-float(float(m[i])/250))*float(maxs[i])-50*float(w[i])
        s.append(max(0.3*maxs[i],a))
    
    print(int(sum(s)+int(h1)*100-int(h2)*50))
calculate()
