#include <bits/stdc++.h>
using namespace std;
int main() {
  int m[5], w[5], i;
  for (i = 0; i < 5; i++) cin >> m[i];
  for (i = 0; i < 5; i++) cin >> w[i];
  int hs, hu;
  cin >> hs >> hu;
  int maxPoint[] = {500, 1000, 1500, 2000, 2500};
  int sum = 0;
  for (i = 0; i < 5; i++)
    sum += max(3 * maxPoint[i] / 10,
               ((250 - m[i]) * maxPoint[i] / 250 - 50 * w[i]));
  sum += hs * 100;
  sum -= hu * 50;
  if (sum < 0) sum = 0;
  cout << sum;
  return 0;
}
