points = [500, 1000, 1500, 2000, 2500]
string = input()
minutes = list(map(int, string.split()))
string = input()
submissions = list(map(int, string.split()))
string = input()
hacks = string.split()
p = 0
for x in range(5):
    a = points[x]
    b = minutes[x]
    c = submissions[x]
    p += max([a * 3 // 10, a - a * b // 250 - c * 50])
p += int(hacks[0]) * 100
p -= int(hacks[1]) * 50
print(p)