import sys

def main():
    arr=map(int,raw_input().split())
    wrr=map(int,raw_input().split())

    xx,yy=map(int,raw_input().split())

    val=500
    ans=0

    for i in range(0,5):
        temp=max(3*val/10,(250-arr[i])*val/250-50*wrr[i])
        ans+=temp
        val+=500


    ans+=100*xx
    ans-=50*yy

    print ans

main()