m = list(map(int, input().split()))
w = list(map(int, input().split()))
t,f = map(int, input().split())
s = 0

s += max(0.3 *500, (1 - m[0] / 250) * 500 - 50 * w[0])
s += max(0.3 *1000, (1 - m[1] / 250) * 1000 - 50 * w[1])
s += max(0.3 *1500, (1 - m[2] / 250) * 1500 - 50 * w[2])
s += max(0.3 *2000, (1 - m[3] / 250) * 2000 - 50 * w[3])
s += max(0.3 * 2500, (1 - m[4] / 250) * 2500 - 50 * w[4])
print(int(s + 100 * t - 50 * f))    
