__author__ = 'suvasish'

import math

def calculate_score(m, w, mxv):
    # print('MAX_V: ', mxv)
    # print('M: ', m)
    # print('W: ', w)
    d = (1 - (m / 250))
    score = d * mxv - 50 * w
    # print('score: ', score)
    return score


m_lst = list(map(int, input().split(' ')))

w_lst = list(map(int, input().split(' ')))

h_lst = list(map(int, input().split(' ')))

res = 0
mxc = 500
val = []
for i in range(0, 5):
    # max_val = 0
    # max_val =
    val.append(calculate_score(m_lst[i], w_lst[i], mxc * (i+1)))

res = math.fsum(val)
res += h_lst[0] * 100
res -= h_lst[1] * 50
vua = str(res).split('.')
if len(vua[-1]) == 1:
    print(vua[0])
else:
    print(res)
