#include <bits/stdc++.h>
using namespace std;
double max(double a, double b) {
  if (a > b) return a;
  return b;
}
int main() {
  int m[5];
  int w[5];
  int right, wrong;
  for (int i = 0; i < 5; i++) {
    cin >> m[i];
  }
  for (int i = 0; i < 5; i++) {
    cin >> w[i];
  }
  cin >> right >> wrong;
  double total = 0;
  double score = 0;
  double pscore = 500;
  for (int i = 0; i < 5; i++) {
    double temp = (double)m[i] / (double)250;
    temp = (double)1 - temp;
    temp = temp * pscore;
    temp = temp - (50 * w[i]);
    temp = max(((double)0.3 * (double)pscore), temp);
    total = total + temp;
    pscore = pscore + 500;
  }
  total = total + (right * 100) - (wrong * 50);
  long ans = (long)total;
  if (ans < 0) ans = 0;
  cout << ans;
  return 0;
}
