#include <bits/stdc++.h>
using namespace std;
int main() {
  int m[5];
  int w[5];
  int s, u;
  for (int i = 0; i < 5; i++) {
    cin >> m[i];
  }
  for (int i = 0; i < 5; i++) {
    cin >> w[i];
  }
  cin >> s >> u;
  double out[5];
  int x[5];
  x[0] = 500;
  x[1] = 1000;
  x[2] = 1500;
  x[3] = 2000;
  x[4] = 2500;
  out[0] = 0.3 * 500;
  out[1] = out[0] * 2;
  out[2] = out[0] * 3;
  out[3] = out[0] * 4;
  out[4] = out[0] * 5;
  for (int i = 0; i < 5; i++) {
    out[i] =
        max(out[i], (((double)1 - (double)m[i] / (double)250) * (double)x[i] -
                     50 * (double)w[i]));
  }
  double ans = 0.0;
  for (int i = 0; i < 5; i++) {
    ans += out[i];
  }
  long long add = 100 * s - 50 * u;
  ans += (double)add;
  cout << (long long)ans << endl;
  return 0;
}
