#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> x(5);
  vector<int> m(5);
  vector<int> w(5);
  int hs, hu;
  double res;
  for (int i = 0; i < 5; i++) {
    x[i] = 500 + i * 500;
  }
  for (int i = 0; i < 5; i++) {
    cin >> m[i];
  }
  for (int i = 0; i < 5; i++) {
    cin >> w[i];
  }
  cin >> hs >> hu;
  for (int i = 0; i < 5; i++) {
    if (0.3 * x[i] > (1 - m[i] / 250) * x[i] - 50 * w[i])
      res += (0.3 * x[i]);
    else
      res += (1 - (double)m[i] / 250) * x[i] - 50 * w[i];
  }
  res += hs * 100;
  res -= hu * 50;
  cout << res;
  return 0;
}
