# -*- coding: utf-8 -*-
"""
Created on Tue Dec  1 15:43:03 2015

@author: matt
"""
a1 = [int(x) for x in input().split(' ')]
a2 = [int(x) for x in input().split(' ')]
a3 = [int(x) for x in input().split(' ')]
x = [500, 1000, 1500, 2000, 2500]
result = 0


def myFunc(x, m, w):
    result = max(0.3 * x, (1 - m / 250) * x - 50 * w)
    return result

for num in range(5):
    result += myFunc(x[num], a1[num], a2[num])

result += 100 * a3[0] - 50 * a3[1]
print(int(result))
