from math import *
from Queue import *
from sys import *
from random import *



x = [500, 1000, 1500, 2000, 2500]
m = map(int, raw_input().split())
w = map(int, raw_input().split())
hs, hu = map(int, raw_input().split())
res = 0
for i in range(5):
    res += max(0.3*x[i], (1-(float(m[i])/250))*x[i] - 50*w[i])
res += 100*hs - 50*hu
print(int(res))
