#include <bits/stdc++.h>
using namespace std;
const int n = 5;
int x[n] = {500, 1000, 1500, 2000, 2500};
int m[n], w[n], h1, h2;
int main(int argn, char* args[]) {
  for (int i = 0; i < n; ++i) cin >> m[i];
  for (int i = 0; i < n; ++i) cin >> w[i];
  cin >> h1 >> h2;
  int r = 0;
  for (int i = 0; i < n; ++i) {
    int r1 = x[i] * 3 * 25;
    int r2 = x[i] * 10 * 25 - x[i] * m[i] - w[i] * 500 * 25;
    r += (r1 > r2 ? r1 : r2) / (10 * 25);
  }
  r += 100 * h1 - 50 * h2;
  cout << r << endl;
  return 0;
}
