mins = map(int,raw_input().split())
wrgs = map(int,raw_input().split())
hs,hu = map(int,raw_input().split())
scores = [500,1000,1500,2000,2500]


res = 0
for i in range(len(mins)):
    res += max(scores[i]*0.3, (1.- mins[i]/250.)*scores[i]-50*wrgs[i])

print int(res + 100*hs - 50*hu)
