import math
x = [500, 1000, 1500, 2000, 2500]
m = map(int, raw_input().split())
w = map(int, raw_input().split())
hs, hu = map(int, raw_input().split())

s = 0
for i in range(5):
  s += max( 3 * x[i] / 10, (250 - m[i]) * x[i] / 250 - 50*w[i])
  
s +=  hs * 100 - hu * 50

print s