#include <bits/stdc++.h>
using namespace std;
int main() {
  double m[5], w[5], val[5] = {500, 1000, 1500, 2000, 2500}, s, u;
  double maxs = 0, sum = 0;
  for (int i = 0; i < 5; ++i) {
    cin >> m[i];
  }
  for (int i = 0; i < 5; ++i) {
    cin >> w[i];
  }
  cin >> s >> u;
  for (int i = 0; i < 5; ++i) {
    maxs = max(0.3 * val[i], ((1 - m[i] / 250) * val[i] - 50 * w[i]));
    sum += maxs;
  }
  sum += abs((s * 100) - (u * 50));
  cout << sum << endl;
  return 0;
}
