#include <bits/stdc++.h>
using namespace std;
double max(double a, double b) {
  if (a >= b)
    return a;
  else
    return b;
}
int main() {
  int m[5], w[5], s, u;
  for (int i = 0; i < 5; i++) cin >> m[i];
  double sum = 0;
  for (int i = 0; i < 5; i++) {
    int x;
    cin >> x;
    sum += (1 - (m[i] / 250.0)) * (500 * (i + 1));
    sum -= 50 * x;
    sum = max(sum, double(0.3 * double(i + 1) * 500.0));
  }
  cin >> s >> u;
  sum += 100 * s;
  sum -= 50 * u;
  cout << sum;
  return 0;
}
