from __future__ import division
def final_score(m,w,h): return int(sum([max(0.3 * 500 * (i + 1) , (1 - (m[i] / 250)) * (500 * (i+1)) - (50 * w[i])) for i in range(0,5)]) + h[0] * 100 - h[1] * 50)
print final_score(map(int,raw_input().split()), map(int,raw_input().split()) , map(int,raw_input().split()))
