#include <bits/stdc++.h>
using namespace std;
int main(void) {
  ios_base ::sync_with_stdio(false);
  cin.tie(0x0);
  double x[8] = {500, 1000, 1500, 2000, 2500};
  double m[8];
  double sum = 0;
  for (int i = 0; i < 5; ++i) cin >> m[i];
  for (int i = 0; i < 5; ++i) {
    double w;
    cin >> w;
    sum += max(0.3 * x[i], (1.0 - (m[i] / 250.0)) * x[i] - (50.0 * w));
  }
  double h;
  cin >> h;
  h *= 100;
  sum += h;
  cin >> h;
  h *= 50;
  sum -= h;
  sum += 1e-4;
  int s = floor(sum);
  cout << s << "\n";
  return 0;
}
