m=map(int, raw_input().split())
w=map(int, raw_input().split())
h=map(int, raw_input().split())
print int(max(0.3*500, ((250-m[0])*2) - 50*w[0]) + max(0.3*1000, ((250-m[1])*4) - 50*w[1]) + max(0.3*1500, ((250-m[2])*6) - 50*w[2]) + max(0.3*2000, ((250-m[3])*8) - 50*w[3]) + max(0.3*2500, ((250-m[4])*10) - 50*w[4]) + 100*h[0] - 50*h[1])