def main():
    m1, m2, m3, m4, m5 = map(int, raw_input().split())
    w1, w2, w3, w4, w5 = map(int, raw_input().split())
    hs, hu = map(int, raw_input().split())
    m = [m1, m2, m3, m4, m5]
    w = [w1, w2, w3, w4, w5]
    x=[500*i for i in xrange(1,6)]
    tentativeScore = [max(3*x[i]/10,(x[i]-m[i]*x[i]/250)-50*w[i]) for i in xrange(len(m))]
    firstPart=[3*x[i]/10 for i in xrange(len(m))]
    secondPart = [(x[i]-m[i]*x[i]/250)-50*w[i] for i in xrange(len(m))]
    finalScore=sum(tentativeScore)+100*hs-50*hu
    print finalScore

main()