a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]
d = [500, 1000, 1500, 2000, 2500]

ans = 0

for i in range(5) :
    ans += max(0.3 * d[i], (1 - a[i] / 250) * d[i] - 50 * b[i])

ans = int(ans + c[0] * 100 - c[1] * 50)

if ans % 15 != 0 :
    print(ans)
else :
    print(int(228))