#include <bits/stdc++.h>
using namespace std;
int GCD(int a, int b) { return (b == 0 ? a : GCD(b, a % b)); }
int LCM(int a, int b) { return a * (b / GCD(a, b)); }
double res, m[10], w[10], hs, hu;
double x[6] = {0, 500, 1000, 1500, 2000, 2500};
int main() {
  for (int i = (1), _b = (5); i <= _b; i++) cin >> m[i];
  for (int i = (1), _b = (5); i <= _b; i++) cin >> w[i];
  cin >> hs >> hu;
  res = 0;
  for (int i = (1), _b = (5); i <= _b; i++)
    res += max(0.3 * x[i], (1 - m[i] / 250) * x[i] - 50 * w[i]);
  res += hs * 100;
  res -= hu * 50;
  printf("%.0f", res);
}
