import sys
m=map(int, sys.stdin.readline().split())
w=map(int, sys.stdin.readline().split())
hs,hu=map(int, sys.stdin.readline().split())

x=[500, 1000, 1500, 2000, 2500]

result=0
for i in xrange(0,5):
    result+=max(3*x[i]/10, x[i]-x[i]*m[i]/250-50*w[i])
result = result + hs*100 - 50*hu
print result