import sys

input_file = sys.stdin
#input_file = open("in.txt")

times = list(map(int,input_file.readline().rstrip().split()))
wr_sub = list(map(int,input_file.readline().rstrip().split()))
hacks = list(map(int,input_file.readline().rstrip().split()))

sum = 0

for index in range(5):
  opt = (index+1)*500
  sum += max(0.3 * opt, (1 - times[index]/250)*opt - 50 * wr_sub[index])

sum += hacks[0] * 100
sum -= hacks[1] * 50

print(int(sum))
