maxPoints = [500*x for x in xrange(1,6)]
def test(l1 = "20 40 60 80 100", l2 = "0 1 2 3 4", l3 = "1 0"):
    l1 = [int(x) for x in l1.split(" ")]
    l2 = [int(x) for x in l2.split(" ")]
    l3 = [int(x) for x in l3.split(" ")]
    return (l1,l2,l3)
##a  = test("119 119 119 119 119", "0 0 0 0 0", "10 0")
##a = test()
a = test(raw_input(),raw_input(),raw_input())
allPoints = 0
for i in xrange(5):
    l1 = a[0]
    l2 = a[1]
    l3 = a[2]       
    allPoints += max(0.3*maxPoints[i],(1-l1[i]/250.)*maxPoints[i]-50*l2[i])
allPoints += l3[0]*100 - l3[1]*50
print int(allPoints)
