I=lambda:list(map(int,input().split()))

f=lambda x,m,w:max(0.3*x,(1-m/250)*x-50*w)

m=I()

w=I()

h=I()

print(int(h[0]*100-h[1]*50+sum([f(500*(i+1),m[i],w[i]) for i in range(5)])))



# Made By Mostafa_Khaled