#include <bits/stdc++.h>
using namespace std;
ifstream f("date.in");
const int NMAX = 5;
double scor = 0;
int punctaj[] = {500, 1000, 1500, 2000, 2500};
int m[NMAX];
int w[NMAX];
int main() {
  double scor1, scor2;
  for (int i = 0; i < NMAX; i++) {
    cin >> m[i];
  }
  for (int i = 0; i < NMAX; i++) {
    cin >> w[i];
    scor1 = punctaj[i] * 3 / 10;
    scor2 = (250 - m[i]) * (punctaj[i] / 250) - 50 * w[i];
    scor = scor + max(scor1, scor2);
  }
  int hs, hu;
  cin >> hs >> hu;
  scor = scor + 100 * hs - 50 * hu;
  cout << (int)scor << '\n';
  return 0;
}
