#include <bits/stdc++.h>
using namespace std;
int m[5], w[5];
int hs, hu;
const int x[] = {500, 1000, 1500, 2000, 2500};
double point = 0;
int main() {
  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)
    point += max(0.3 * x[i], (1 - m[i] / 250.0) * x[i] - 50 * w[i]);
  point += hs * 100;
  point -= hu * 50;
  cout << (int)point << '\n';
  return 0;
}
