t = map(float,raw_input().split())
w = map(float,raw_input().split())
a,b = map(int,raw_input().split())
score = [500.0, 1000.0, 1500.0, 2000.0,2500.0]
ans = 0
for i in range(len(score)):
    ans += max(0.3*(score[i]),score[i]*(250-t[i])/250.0 - 50*w[i])
print int(ans) + 100*a - 50*b