#include <bits/stdc++.h>
using namespace std;
int main() {
  int m[50];
  for (int i = 1; i <= 5; i++) {
    cin >> m[i];
  }
  int w[50];
  int v[10];
  for (int i = 1; i <= 5; i++) {
    cin >> w[i];
    v[i] = 500 * i;
  }
  int sh, uh;
  cin >> sh >> uh;
  double scor = 0;
  scor += sh * 100 - uh * 50;
  for (int i = 1; i <= 5; i++) {
    scor += max(v[i] * 0.3, (double)(250 - m[i]) * v[i] / 250 - 50 * w[i]);
  }
  cout << scor;
  return 0;
}
