#!/usr/bin/env python3

import fractions

if __name__ == '__main__':
    X = [500, 1000, 1500, 2000, 2500]
    M = list(map(int, input().split()))
    W = list(map(int, input().split()))
    Hs, Hu = map(int, input().split())

    score = 100*Hs - 50*Hu
    for x, m, w in zip(X, M, W):
        a = fractions.Fraction(3*x, 10)
        b = (1 - fractions.Fraction(m, 250))*x - 50*w
        score += max(a, b)
    print(score)



