score = [500, 1000, 1500, 2000, 2500]
time = map(int,raw_input().split())
wrong = map(int,raw_input().split())
s,u = map(int,raw_input().split())

ans = 0
for i in range(5):
    ans += max(0.3*score[i], (1-1.0*time[i]/250)*score[i] - 50*wrong[i])
ans += 100*s - 50*u
print int(ans)
