# -*- coding:utf-8 -*-
import sys
def some_func():
    """
    """
    n_list0 = [500, 1000, 1500, 2000,  2500]
    n_list1= map(int, sys.stdin.readline().split())
    n_list2 = map(int, sys.stdin.readline().split())
    s1,s2 = map(int, sys.stdin.readline().split())

    soc=0
    for i in range(5):
        soc += max([0.3*n_list0[i], (250-n_list1[i])*n_list0[i]/250-50*n_list2[i]])

    soc +=(s1*100)
    soc -=(s2*50)
    print soc








if __name__ == '__main__':
    some_func()

