#!/usr/bin/python

import fractions
f = fractions.Fraction

def ir():
    return f(raw_input())

def ia():
    line = raw_input()
    line = line.split()
    return map(f, line)

x = map(f, [500, 1000, 1500, 2000, 2500])

m = ia()
w = ia()

hs, hu = ia()

def score(m, w, x):
    return max( 3*x/10, (1 - m/250)*x - 50*w)
        

ans = f(0)
for i in range(len(m)):
    ans = ans + score(m[i], w[i], x[i])

ans = ans + hs * 100
ans = ans - hu * 50
print ans
