import sys
#in_file = open("test.txt")
in_file = sys.stdin



points = [500.0*i for i in range(1,6)]

m = map(int, in_file.readline().strip().split() )
w = map(int, in_file.readline().strip().split() )
s,u = map(int, in_file.readline().strip().split() )

total = 0.0

for i in range(5):
    x = points[i]
    total += max(0.3*x, (1.0 - float(m[i])/250.0)*x-50.0*float(w[i]))

total += 100.0 * s
total -= 50.0 * u

print int(total)


