ans, a, b = 0, map(float, raw_input().split()), map(int, raw_input().split())
for i in range(5):
    ans += max(0.3 * (i + 1) * 500, (1 - a[i] / 250) * (i + 1) * 500 - 50 * b[i])
s, u = map(int, raw_input().split())
ans += 50 * (s + s - u)
print int(ans)
