#!/usr/bin/env python3

import sys

input = iter(sys.stdin.read().splitlines()).__next__

#from io import StringIO
#sys.stdout = StringIO()
#from atexit import register
#register(lambda: sys.stdout.write(sys.stdout.getvalue()))


sys.setrecursionlimit(10000)

M = list(map(int, input().split()))
W = list(map(int, input().split()))
hs, hu = map(int, input().split())

X = [500, 1000, 1500, 2000, 2500]
score = 0
for i in range(5):
   score += max(3*X[i]//10, ((250 - M[i])*X[i])//250 - 50*W[i])

score += hs*100 - hu*50

print(score)
