ms = [int(r) for r in raw_input().split()]
ws = [int(r) for r in raw_input().split()]
xm = [500*(int(r)+1) for r in xrange(0,5)]
hs, hu = [int(r) for r in raw_input().split()]
score = [max(3*x[0]/10, (250-x[1][0])*x[0]/250-50*x[1][1]) for x in zip(xm,zip(ms,ws))]
print sum(score)-hu*50+hs*100