# print("Input the five times")
times = [int(x) for x in input().split()]

# print("Input the wrong answers")
wrong = [int(x) for x in input().split()]

# print("Input the hack info")
goodh, badh = [int(x) for x in input().split()]

maxpoints = [500*i for i in range(1,6)]
answer = 0
for i in range(5):
    answer += max(maxpoints[i] * 0.3, (1 - times[i]/250) * maxpoints[i] - 50 * wrong[i])

answer += goodh * 100
answer -= badh * 50

print(int(answer))
