#!/usr/bin/env pypy

pts = (500, 1000, 1500, 2000, 2500)

times = tuple(map(int, raw_input().split()))
attempts = tuple(map(int, raw_input().split()))
shack, uhack = tuple(map(int, raw_input().split()))
# print(pts)
# print(times)
# print(attempts)

def points(x,m,w):
    d = ((1-(m/250.0))*x)-(50*w)
    # print(x, m, w, d)
    return max(x*0.3, d)

total = 0

for i in range(5):
    c = points(pts[i], times[i], attempts[i])
    total += c
    # print(c)

# print(total)

total += shack*100
total -= uhack*50
print(int(total))
