import sys
x1 = 500
x2 = 1000
x3 = 1500
x4 = 2000
x5 = 2500
m1,m2,m3,m4,m5 = map(int,input().split())
w1,w2,w3,w4,w5 = map(int,input().split())
h1,h2 = map(int,input().split())

res1 = max( (0.3*x1),( (1 - (m1/250) )*x1 ) - 50*w1  )
res2 = max( (0.3*x2),( (1 - (m2/250) )*x2 ) - 50*w2  )
res3 = max( (0.3*x3),( (1 - (m3/250) )*x3 ) - 50*w3  )
res4 = max( (0.3*x4),( (1 - (m4/250) )*x4 ) - 50*w4  )
res5 = max( (0.3*x5),( (1 - (m5/250) )*x5 ) - 50*w5  )

res = ( res1 + res2 + res3 + res4 + res5 ) + 100*h1 - 50*h2

print(int(res))