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