m = map(int, raw_input().split())
w = map(int, raw_input().split())
h = map(int, raw_input().split())
weight = [500, 1000, 1500, 2000, 2500]
score = [ max(0.3*weight[i], (1-m[i]/250.0)*weight[i]-50*w[i]) for i in range(5) ]
print score
s = sum(score) + h[0]*100 - h[1]*50
print int(s)








