#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author  : Napoleon
# @Mail    : tyfdream@163.com
# @Data    : 2015-11-25 20:40:51
# @Version : python 2.7

m = map(int, raw_input().split())
w = map(int, raw_input().split())
h = map(int, raw_input().split())
high = [500*(i+1) for i in range(5)]
ans = 0
for i in range(5):
	ans += max(0.3*high[i], (1-1.0*m[i]/250)*high[i] - 50*w[i])

ans += 100*h[0] - 50*h[1]

print int(ans)