#include <bits/stdc++.h>
using namespace std;
int main() {
  double m[5], w[5], p[] = {500, 1000, 1500, 2000, 2500};
  for (int i = 0; i < 5; i++) {
    cin >> m[i];
  }
  double total = 0;
  for (int i = 0; i < 5; i++) {
    cin >> w[i];
    total += max(0.3 * p[i], ((1.0 - (m[i] / 250.0)) * p[i]) - (50 * w[i]));
  }
  int h, n;
  cin >> h >> n;
  cout << total + 100 * h - 50 * n;
  return 0;
}
