
if __name__== "__main__":
    m=map(int,raw_input().split())
    w = map(int, raw_input().split())
    hs,hu=map(int,raw_input().split())
    p=[500,1000,1500,2000,2500]
    s=0
    for i in range(5):
        s+=max(3*p[i]/10,p[i]-m[i]*p[i]/250-w[i]*50)
    print s+100*hs-50*hu
