a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
ans = sum([max(0.3 * (500 * (i + 1)), (1 - a[i] / 250) * (500 * (i + 1)) - 50 * b[i]) for i in range(5)])
print(sum([int(ans + c[0] * 100 - c[1] * 50) for c in [[int(x) for x in input().split()]]]))