
def main():
    M = map(int, raw_input().split())
    W = map(int, raw_input().split())
    H = map(int, raw_input().split())
    score = 0
    for i in range(5):
        score += max(0.3*500*(i+1), (1-float(M[i])/250)*500*(i+1) - 50*W[i])
    score += 100*H[0]
    score -= 50*H[1]
    score = max(0, score)
    print int(score)

if __name__ == "__main__":
    main()
