scores = [500, 1000, 1500, 2000, 2500]


def cowforces(lst1, lst2, hs, hu):
    total = 0
    for i in range(len(lst1)):
        total += max(3 * scores[i] / 10, (250 - lst1[i]) * scores[i] / 250 - 50 * lst2[i])
    return int(total + hs * 100 - hu * 50)


m = [int(x) for x in input().split()]
w = [int(y) for y in input().split()]
h_s, h_u = [int(z) for z in input().split()]
print(cowforces(m, w, h_s, h_u))
