m1,m2,m3,m4,m5 = list(map(int,input().split()))
w1,w2,w3,w4,w5 = map(int,input().split())
hs,hu = map(int,input().split())

a1 = max(0.3*500,(1-m1/250)*500-50*w1)
a2 = max(0.3*1000,(1-m2/250)*1000-50*w2)
a3 = max(0.3*1500,(1-m3/250)*1500-50*w3)
a4 = max(0.3*2000,(1-m4/250)*2000-50*w4)
a5 = max(0.3*2500,(1-m5/250)*2500-50*w5)

print(int(a1+a2+a3+a4+a5+(100*hs)-50*hu))