#import sys
#sys.stdin = open('in')

res = 0
a = [500, 1000, 1500, 2000, 2500]
m = map(int,raw_input().split())
w = map(int,raw_input().split())
hs, hu = map(int,raw_input().split())

for i in range(5):
    res += max(0.3*a[i], (1-m[i]/250.0)*a[i] - 50*w[i])

res += 100*hs
res -= 50 *hu

print int(res)
