#!/usr/bin/env python3

def f(x, m, w):
    return max(0.3 * x, (1 - m/250) * x - 50 * w)

def read_ints():
    return map(int, input().strip().split())

x = [500, 1000, 1500, 2000, 2500]
m = read_ints()
w = read_ints()
hs, hu = read_ints()

s = sum(f(xi, mi, wi) for (xi, mi, wi) in zip(x, m, w))

print(round(s + 100 * hs - 50 * hu))
