import logging
import copy
import sys

logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)

#def solve(firstLine):
def solve(firstLine, secondLine, thridLine):
    score = 0
    baseScore = [500, 1000,1500,2000,2500]
    for i in range(5):
        x = baseScore[i]
        m = firstLine[i]
        w = secondLine[i]
        score += max([0.3 * x, (1-m/250) * x - 50 *w ])

    score += 100 * thridLine[0]
    score += -50 * thridLine[1]
    return int(score)

def main():
    firstLine = input().split()
    firstLine = list(map(int, firstLine))
    inputLines = []
    for i in range(2):
        line = input().split()
        line = list(map(int, line))
        inputLines.append(line)
        
    #solve(firstLine)
    print(solve(firstLine, inputLines[0], inputLines[1]))

def log(*message):
    logging.debug(message)
    
if __name__ == "__main__":
    main()
