
minute = input()
minute = list(minute.split())
tries = input()
tries = list(tries.split())
hacks = input()
hacks = list(hacks.split())

score = 0
for i in range(5):
    ex = max(0.3*(i+1)*500, (1-(int(minute[i])/250))*(500*(i+1))-50*int(tries[i]))
    score+=ex

score += int(hacks[0])*100
score -= int(hacks[1])*50
print(int(score))
