import sys
x = [500, 1000, 1500, 2000, 2500]
m = list(map(int, sys.stdin.readline().split()))
w = list(map(int, sys.stdin.readline().split()))
hs, hu = map(int, sys.stdin.readline().split())
ans = sum([max((3*xi)//10, xi-(mi*xi)//250-50*wi) for xi, mi, wi in zip(x,m,w)])
print(ans+100*hs-50*hu)
