def main():
    times = input().split()
    time1 = float(times[0])
    time2 = float(times[1])
    time3 = float(times[2])
    time4 = float(times[3])
    time5 = float(times[4])
    wrongs = input().split()
    wrong1 = int(wrongs[0])
    wrong2 = int(wrongs[1])
    wrong3 = int(wrongs[2])
    wrong4 = int(wrongs[3])
    wrong5 = int(wrongs[4])
    hacks = input().split()
    hack_complete = int(hacks[0])
    hack_failed = int(hacks[1])
    sum = max(0.3 * 500, (1-time1/250)*500 - 50*wrong1) + max(0.3 * 1000, (1-time2/250)*1000 - 50*wrong2) + max(0.3 * 1500, (1-time3/250)*1500 - 50*wrong3) + max(0.3 * 2000, (1-time4/250)*2000 - 50*wrong4) + max(0.3 * 2500, (1-time5/250)*2500 - 50*wrong5) + 100*hack_complete - 50*hack_failed
    print(int(sum))
main()
