__author__ = 'abd el rahman'
m = map(int , raw_input().split())
w = map(int ,raw_input().split())
xx , xy = map(int , raw_input().split())

count = 0
for i in range(0,5):
    x = (i +1) * 500
    count += max(0.3 * x ,(((1-(m[i]/250.0)) * x) - (50.0 * w[i])))

count += xx*100
count -= xy * 50

print int(count)